From d9530de129923d1fd903e71d1132f40500888b4e Mon Sep 17 00:00:00 2001 From: Daniel Stelzer Date: Sat, 29 Aug 2026 12:45:48 -0500 Subject: [PATCH] fix problem with styles after progress bar on Z-machine --- readme.txt | 4 ++++ src/runtime_z.c | 1 + 2 files changed, 5 insertions(+) diff --git a/readme.txt b/readme.txt index 3e9c5f76..44c28f97 100644 --- a/readme.txt +++ b/readme.txt @@ -49,6 +49,10 @@ Release notes: The problem isn't really fixed, but it will no longer corrupt your game text. + Backend: styles are now properly reset after printing a progress + bar inside a div on Z-machine. (Previously it would reset to + unstyled text, even if the div was bold or italic.) + Unit test runner: (game over) and (game over $) are now overridden in unit.dg, to enable testing of win conditions. diff --git a/src/runtime_z.c b/src/runtime_z.c index 43dd094f..9f5677ed 100644 --- a/src/runtime_z.c +++ b/src/runtime_z.c @@ -3995,6 +3995,7 @@ struct rtroutine rtroutines[] = { // not inside status box {Z_BUFFER_MODE, {SMALL(1)}}, {Z_TEXTSTYLE, {SMALL(0)}}, + {Z_CALL1N, {ROUTINE(R_RESET_STYLE)}}, // Reset to the div's style {Z_RFALSE}, {Z_END}, }