k21971 / EvilHack

A variant of NetHack that is designed to be a much more challenging experience than the original, drawing inspiration and content from various existing variants along with adding unique and never-before-seen custom content.
Other
52 stars 21 forks source link

Band-aid: Catch crashes from splitobj() caused by can_carry() #155

Closed saltwaterterrapin closed 12 months ago

saltwaterterrapin commented 12 months ago

Relates to commit 4dde18ca6fda25d0141c9579dc8dc76a997c47c2. elunna discovered a crash relating to can_carry() (https://github.com/elunna/hackem/issues/485), but it's unclear exactly what went wrong. The crash is not automatically recoverable, so until this is figured out, clip the return value of can_carry to sensible values, and throw an impossible() so players will notice when it happens; hopefully this will help diagnose the issue.