From 1d361d6db0e0c340c865ed9bbf90f77b8f3b5934 Mon Sep 17 00:00:00 2001 From: dolorous Date: Fri, 27 Jun 2008 00:47:16 +0000 Subject: Fix [2003446]: Don't bother trying to take boots off a formerly transformed centaur (or naga) if they have nothing equipped in the boots slot. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6160 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/transfor.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/transfor.cc') 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) -- cgit v1.2.3-54-g00ecf