Soviet5lo / SlashTHEM

Super Lotsa Added Stuff Hack - The Heavily Extended Mod: A variant of Slash'EM that adds a bunch of content.
30 stars 9 forks source link

Bad logic in CREATE_PORTAL can deteriorate game state and lead to panic #32

Closed demogorgon22 closed 3 years ago

demogorgon22 commented 3 years ago

https://github.com/Soviet5lo/SlashTHEM/blob/develop/src/artifact.c#L2022 If you do a create portal invoke in the black market like 15-20 times without saving between them it will fill the window slots and the game will panic (it breaks before the window gets destroyed, just call destroy_nhwindow(tmpwin); before breaking)

Apparently this is present in Slash'em and UnNethack as well still so don't feel bad.

AmyBSOD commented 3 years ago

Here's a fix: https://github.com/SLASHEM-Extended/SLASHEM-Extended/commit/2d8e3a965