This time on making a wish for something that doesn't exist in the game. Which is weird because I haven't messed with the wish code at all.
Basically if you wish for "foo" or some other thing that isn't an item or a monster, the game will spit out a Lua error about doing get_stick_charges on a nil value, followed by a crash. The backtrace looks like this:
I did try doing a check for NULL before object1.c line 1262... That prevents the crash, but I still get an unsightly Lua error, which I'm guessing indicates that that wasn't the actual bug.
(Any help would be appreciated, I'm terribly lame with dealing with strings in C.)
Edit: and yeah I realize it's probably a bad sign when altering one part of a codebase causes a completely unrelated part to throw an error.
Basically if you wish for "foo" or some other thing that isn't an item or a monster, the game will spit out a Lua error about doing get_stick_charges on a nil value, followed by a crash. The backtrace looks like this:
Code:
#0 object_desc_str (t=0xbffff054 "", s=0x0) at object1.c:1262 #1 0x0810c54e in object_desc (buf=0xbffff178 "wand of poison blood", o_ptr=0xbffff2b0, pref=0, mode=0) at object1.c:2059 #2 0x08136a2a in test_object_wish (name=0xbffff330 "foo", o_ptr=0xbffff2b0, forge=0xbffff2b0, what=0x81ea03f "wish") at xtra2.c:7411 #3 0x08136dde in make_wish () at xtra2.c:7570 #4 0x081c04aa in do_cmd_debug () at wizard2.c:1912 #5 0x080ec59e in process_command () at dungeon.c:3558 #6 0x080f159e in process_player () at dungeon.c:4875 #7 0x080f2296 in dungeon (new_game=<value optimized out>) at dungeon.c:5327 #8 play_game (new_game=<value optimized out>) at dungeon.c:5816 #9 0x081dea5c in main (argc=1, argv=<value optimized out>) at main.c:908
(Any help would be appreciated, I'm terribly lame with dealing with strings in C.)
Edit: and yeah I realize it's probably a bad sign when altering one part of a codebase causes a completely unrelated part to throw an error.
Comment