From 00ad56bb087244a49f0b0b31faf1a75c182e18e7 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Fri, 11 Jan 2008 12:53:31 +0000 Subject: Fix assert that can be triggered in non-English versions of The Feeble Files for Amiga/Macintosh. svn-id: r30406 --- engines/agos/charset.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'engines/agos/charset.cpp') diff --git a/engines/agos/charset.cpp b/engines/agos/charset.cpp index 8121fac35a..0938669bca 100644 --- a/engines/agos/charset.cpp +++ b/engines/agos/charset.cpp @@ -356,7 +356,13 @@ void AGOSEngine::renderString(uint vga_sprite_id, uint color, uint width, uint h dst -= img_width - 1; // For Hebrew, move from right edge to left edge of image. byte *cur_dst = dst; - assert(img_width > 0 && img_width < 50 && img_height > 0 && img_height < 50); + // Occurs in Amiga and Macintosh ports of The Feeble Files, when + // special characters are used by French/German/Spanish versions. + // Due to the English image data, been used by all languages. + if (img_width == 0 || img_height == 0) + continue; + + assert(img_width < 50 && img_height < 50); do { for (i = 0; i != img_width; i++) { -- cgit v1.2.3