diff options
Diffstat (limited to 'crawl-ref/source/transfor.cc')
-rw-r--r-- | crawl-ref/source/transfor.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crawl-ref/source/transfor.cc b/crawl-ref/source/transfor.cc index 7b2b676e65..df10d0562e 100644 --- a/crawl-ref/source/transfor.cc +++ b/crawl-ref/source/transfor.cc @@ -754,10 +754,12 @@ void untransform(void) // Removed barding check, no transformed creatures can wear barding // anyway. // *coughs* Ahem, blade hands... -- jpeg - if ((you.species == SP_NAGA || you.species == SP_CENTAUR) - && you.inv[you.equip[EQ_BOOTS]].sub_type == ARM_BOOTS) + if (you.species == SP_NAGA || you.species == SP_CENTAUR) { - remove_one_equip(EQ_BOOTS); + const int arm = you.equip[EQ_BOOTS]; + + if (arm != -1 && you.inv[arm].sub_type == ARM_BOOTS) + remove_one_equip(EQ_BOOTS); } if (hp_downscale != 10 && you.hp != you.hp_max) |