From 091652376323a54a55327d114c0da994ec859d80 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 13 Mar 2009 07:56:06 +0000 Subject: Added an explanatory comment for commit #39368 svn-id: r39369 --- engines/sci/engine/kstring.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'engines/sci/engine') diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp index c637826d22..1bcde36a9c 100644 --- a/engines/sci/engine/kstring.cpp +++ b/engines/sci/engine/kstring.cpp @@ -414,6 +414,10 @@ static int is_print_str(char *str) { if (len == 0) return 1; while (*str) { + // We're ANDing the string with 0xFF to prevent a situation + // where MSVC could sometimes falsely parse the character as + // multibyte/Unicode, thereby overflowing an assertion inside + // isprint(). This occurs after the intro of LSL5, for example. if (isprint((*str & 0xFF))) printable++; str++; } -- cgit v1.2.3