diff options
-rw-r--r-- | engines/sci/gui/gui_gfx.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sci/gui/gui_gfx.cpp b/engines/sci/gui/gui_gfx.cpp index 6b53481339..ebf54687f4 100644 --- a/engines/sci/gui/gui_gfx.cpp +++ b/engines/sci/gui/gui_gfx.cpp @@ -336,7 +336,7 @@ int16 SciGuiGfx::TextCodeProcessing(const char *&text, GuiResourceId orgFontId, unsigned char curCodeParm; // Find the end of the textcode - while ((++textCodeSize) && (*text++ != 0x7C)) { } + while ((++textCodeSize) && (*text != 0) && (*text++ != 0x7C)) { } // possible TextCodes: // c -> sets textColor to current port pen color |