[Scummvm-cvs-logs] SF.net SVN: scummvm:[53746] scummvm/trunk/engines/sci/engine/kmisc.cpp
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Sat Oct 23 22:22:24 CEST 2010
Revision: 53746
http://scummvm.svn.sourceforge.net/scummvm/?rev=53746&view=rev
Author: m_kiewitz
Date: 2010-10-23 20:22:24 +0000 (Sat, 23 Oct 2010)
Log Message:
-----------
SCI: always allocate +1 byte in kMemory now
fixes multilingual lsl5 room 280 - names of airport ladies not shown correctly (bug #3093818)
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kmisc.cpp
Modified: scummvm/trunk/engines/sci/engine/kmisc.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmisc.cpp 2010-10-23 20:07:06 UTC (rev 53745)
+++ scummvm/trunk/engines/sci/engine/kmisc.cpp 2010-10-23 20:22:24 UTC (rev 53746)
@@ -231,14 +231,18 @@
switch (argv[0].toUint16()) {
case K_MEMORY_ALLOCATE_CRITICAL: {
int byteCount = argv[1].toUint16();
- // WORKAROUND: pq3 (multilingual) when plotting crimes - allocates the
- // returned bytes from kStrLen on "W" and "E" and wants to put a
- // string in there, which doesn't fit of course. That's why we allocate
- // one byte more all the time inside that room
- if (g_sci->getGameId() == GID_PQ3) {
- if (s->currentRoomNumber() == 202)
- byteCount++;
- }
+ // WORKAROUND:
+ // - pq3 (multilingual) room 202
+ // when plotting crimes, allocates the returned bytes from kStrLen
+ // on "W" and "E" and wants to put a string in there, which doesn't
+ // fit of course.
+ // - lsl5 (multilingual) room 280
+ // allocates memory according to a previous kStrLen for the name of
+ // the airport ladies (bug #3093818), which isn't enough
+
+ // We always allocate 1 byte more, because of this
+ byteCount++;
+
if (!s->_segMan->allocDynmem(byteCount, "kMemory() critical", &s->r_acc)) {
error("Critical heap allocation failed");
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list