From 986987110b225e24673dee8670a08042e484d32a Mon Sep 17 00:00:00 2001 From: Nicolas Bacca Date: Thu, 18 Jul 2002 22:50:31 +0000 Subject: Workaround for French version crash svn-id: r4593 --- simon/simonverb.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/simon/simonverb.cpp b/simon/simonverb.cpp index dfd69deffb..3bdb2da014 100644 --- a/simon/simonverb.cpp +++ b/simon/simonverb.cpp @@ -414,7 +414,11 @@ bool SimonState::hitarea_proc_2(uint a) return false; string_ptr = getStringPtrByID(_stringid_array_2[a]); - x = (53 - (strlen((const char *)string_ptr) - 1)) * 3; + // Arisme : hack for long strings in the French version + if ((strlen((const char*)string_ptr) - 1) <= 53) + x = (53 - (strlen((const char *)string_ptr) - 1)) * 3; + else + x = 0; showActionString(x, string_ptr); return true; @@ -434,7 +438,11 @@ bool SimonState::hitarea_proc_3(Item *item) return false; string_ptr = getStringPtrByID(child2->string_id); - x = (53 - (strlen((const char *)string_ptr) - 1)) * 3; + // Arisme : hack for long strings in the French version + if ((strlen((const char*)string_ptr) - 1) <= 53) + x = (53 - (strlen((const char *)string_ptr) - 1)) * 3; + else + x = 0; showActionString(x, string_ptr); return true; } -- cgit v1.2.3