segfault in `item::Alchemize` (and small bug)

Mar 7, 7:54 pm
#1
Joined: Sep 5, 2010
Interests: make more ivans!
Posts: 430
first, `(Midas && IsOnGround())` is excessive. underground shops are not special! i.e. `IsOnGround()` should be removed.

and second: `Midas->SetMoney(Midas->GetMoney() + Price);` is not guarded with `if (Midas)`. it should be: `if (Midas) Midas->EditMoney(Price);`. otherwise alchemy wand broken by mine trap explosion, for example, will cause a segfault.
Mar 7, 10:06 pm
#2
Joined: Sep 5, 2010
Interests: make more ivans!
Posts: 430
oops. wrong forum. sorry. move it to "bugs", please.
Mar 9, 11:58 am
#3
Joined: Apr 2, 2014
Occupation: Navastating
Location: Aslona
Posts: 854
Thanks!
Jump to