diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2014-06-26 10:27:47 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2014-06-26 15:04:16 -0700 |
commit | 34807ca9fccc7425573256645024722571ef4442 (patch) | |
tree | 5e716b7fa2d786b15da403072bb6f41f3dfbcc65 /src/map/magic-expr.cpp | |
parent | b353ae37eb6d374aec4127f1849a5dce81f812b5 (diff) | |
download | tmwa-34807ca9fccc7425573256645024722571ef4442.tar.gz tmwa-34807ca9fccc7425573256645024722571ef4442.tar.bz2 tmwa-34807ca9fccc7425573256645024722571ef4442.tar.xz tmwa-34807ca9fccc7425573256645024722571ef4442.zip |
specialize inventory/storage indices
Diffstat (limited to 'src/map/magic-expr.cpp')
-rw-r--r-- | src/map/magic-expr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/magic-expr.cpp b/src/map/magic-expr.cpp index b0e68fb..1e5c829 100644 --- a/src/map/magic-expr.cpp +++ b/src/map/magic-expr.cpp @@ -858,8 +858,8 @@ int fun_is_equipped(dumb_ptr<env_t>, val_t *result, Slice<val_t> args) for (EQUIP i : EQUIPs) { - int idx = chr->equip_index_maybe[i]; - if (idx >= 0 && chr->status.inventory[idx].nameid == item.nameid) + IOff0 idx = chr->equip_index_maybe[i]; + if (idx.ok() && chr->status.inventory[idx].nameid == item.nameid) { retval = true; break; |