aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorNicolas Bacca2002-07-18 22:50:31 +0000
committerNicolas Bacca2002-07-18 22:50:31 +0000
commit986987110b225e24673dee8670a08042e484d32a (patch)
tree0496b25ad4dee581fc7a4182996895d887381fdf /simon
parent984a6e7a4956cc65dbb04f1fa7b89fcbbfefb6d8 (diff)
downloadscummvm-rg350-986987110b225e24673dee8670a08042e484d32a.tar.gz
scummvm-rg350-986987110b225e24673dee8670a08042e484d32a.tar.bz2
scummvm-rg350-986987110b225e24673dee8670a08042e484d32a.zip
Workaround for French version crash
svn-id: r4593
Diffstat (limited to 'simon')
-rw-r--r--simon/simonverb.cpp12
1 files 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;
}