aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorMartin Kiewitz2014-11-02 02:31:32 +0100
committerMartin Kiewitz2014-11-02 02:31:32 +0100
commit9d693b9a793f1d14d9b80a0341ac55dfc2da0b0b (patch)
tree10478a074e75ac8514f49bb822da29362b51517c /engines/sci
parentc4ca0a7de29ab32d35e72ae88ed399b377a3c2c7 (diff)
downloadscummvm-rg350-9d693b9a793f1d14d9b80a0341ac55dfc2da0b0b.tar.gz
scummvm-rg350-9d693b9a793f1d14d9b80a0341ac55dfc2da0b0b.tar.bz2
scummvm-rg350-9d693b9a793f1d14d9b80a0341ac55dfc2da0b0b.zip
SCI: fix another bug in text16 / GetLongest()
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/graphics/text16.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/sci/graphics/text16.cpp b/engines/sci/graphics/text16.cpp
index 37d786a849..4f9b6c7da8 100644
--- a/engines/sci/graphics/text16.cpp
+++ b/engines/sci/graphics/text16.cpp
@@ -177,7 +177,7 @@ int16 GfxText16::GetLongest(const char *&textPtr, int16 maxWidth, GuiResourceId
while (1) {
curChar = (*(const byte *)textPtr);
if (_font->isDoubleByte(curChar)) {
- curChar |= (*(const byte *)textPtr + 1) << 8;
+ curChar |= (*(const byte *)(textPtr + 1)) << 8;
}
switch (curChar) {
case 0x7C:
@@ -196,7 +196,7 @@ int16 GfxText16::GetLongest(const char *&textPtr, int16 maxWidth, GuiResourceId
// Sierra did it the same way.
case 0xD:
// Check, if 0xA is following, if so include it as well
- if ((*(const byte *)textPtr + 1) == 0xA) {
+ if ((*(const byte *)(textPtr + 1)) == 0xA) {
curCharCount++; textPtr++;
}
// it's meant to pass through here
@@ -255,7 +255,7 @@ int16 GfxText16::GetLongest(const char *&textPtr, int16 maxWidth, GuiResourceId
curChar = (*(const byte *)textPtr);
if (!_font->isDoubleByte(curChar))
error("Non double byte while seeking back");
- curChar |= (*(const byte *)textPtr + 1) << 8;
+ curChar |= (*(const byte *)(textPtr + 1)) << 8;
}
// But it also checked, if the current character is not inside a punctuation table and it even
@@ -282,7 +282,7 @@ int16 GfxText16::GetLongest(const char *&textPtr, int16 maxWidth, GuiResourceId
curChar = (*(const byte *)textPtr);
if (!_font->isDoubleByte(curChar))
error("Non double byte while seeking back");
- curChar |= (*(const byte *)textPtr + 1) << 8;
+ curChar |= (*(const byte *)(textPtr + 1)) << 8;
}
// include the current character
curCharCount += 2; textPtr += 2;