[2.8.0] Crash on "bad" item pickup
Posted: Tue Feb 09, 2016 2:43 am
There is no check for actual type in A_GiveInventory() and bunch of related functions. The following code will lead to a crash when player will try to pickup an item.
EDIT:
It's worth noting that scripting doesn't have this issue as actor inheritance is checked and an error is printed to console.
That's why I made a pull request with the fix to maint instead of master branch.
Also, I added no error message as it will be printed on every frame (not just once like in scripting) flooding the log quickly.
Spoiler: Example of 'give non-inventory actor' issueYou can try it yourself using the attached file. Launch with this command line zdoom -iwad doom -file inventory_crash.wad +map e1m1 +summon a and go forward.
EDIT:
It's worth noting that scripting doesn't have this issue as actor inheritance is checked and an error is printed to console.
That's why I made a pull request with the fix to maint instead of master branch.
Also, I added no error message as it will be printed on every frame (not just once like in scripting) flooding the log quickly.