Files
nethack/doc
PatR 90d515b6ab fix #K4091 - losexp() assert(u.ulevel < 30) fail
Previously reported via github pull request #1188 as an out of bounds
access to u.uhpinc[], followed by issue #1189 when it was closed, the
backtrace accompanying new assertion failure provided more information
that led to figuring out the problem.

Only mattered for the debug fuzzer; wouldn't happen in regular play.

When the hero dies during fuzzing, the fuzzer sometimes restores lost
levels via blessed potion of restore ability.  If that happened to a
hero who died by being life-drained while at level 1 then losexp()'s
assumption that life-saved hero was still level 1 got violated.  If
levels had been lost all the way down from a peak of 30, restoration
to u.ulevel==30 resulted in invalid array indexing into u.uhpinc[],
then failure of 'assert(u.ulevel >= 0 && u.ulevel < MAXULEV)' which
was added to avoid that.

Pull request #1188 and issue #1189 are already closed, but they hadn't
actually been solved yet.

Fixes #1188
Fixes #1189
2024-01-24 14:31:26 -08:00
..
2022-06-18 10:29:15 -04:00
2023-02-27 10:18:14 -05:00
2023-08-28 16:17:41 -04:00
2022-01-29 22:57:22 -05:00
2022-01-29 22:57:22 -05:00
2022-01-29 22:57:22 -05:00
2024-01-19 10:44:39 -08:00
2024-01-19 10:44:39 -08:00
2024-01-19 09:31:29 -05:00
2024-01-19 17:59:43 +02:00
2018-11-11 10:29:52 -05:00
2018-11-11 10:29:52 -05:00
2022-02-22 20:14:44 -05:00
2023-08-28 16:17:41 -04:00
2018-09-20 18:02:48 -04:00