aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2003-06-13 09:24:00 +0000
committerMax Horn2003-06-13 09:24:00 +0000
commit77aa2fe000ef28f05480ad6f927fd17fc61156f9 (patch)
tree3865f14028e6e908059a946343b1d2a374a1e7e7 /scumm
parent36c50f10f3816aaad247b179da39971246162539 (diff)
downloadscummvm-rg350-77aa2fe000ef28f05480ad6f927fd17fc61156f9.tar.gz
scummvm-rg350-77aa2fe000ef28f05480ad6f927fd17fc61156f9.tar.bz2
scummvm-rg350-77aa2fe000ef28f05480ad6f927fd17fc61156f9.zip
fix for bug #752843 (based on patch #748675)
svn-id: r8458
Diffstat (limited to 'scumm')
-rw-r--r--scumm/verbs.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/scumm/verbs.cpp b/scumm/verbs.cpp
index cdebff4219..5fde04a80c 100644
--- a/scumm/verbs.cpp
+++ b/scumm/verbs.cpp
@@ -199,6 +199,15 @@ void Scumm::redrawV2Inventory() {
_messagePtr = getObjOrActorName(obj);
assert(_messagePtr);
+
+ // Prevent inventory entries from overflowing by truncating the text
+ // after 144/8 = 18 chars
+ byte msg[18 + 1];
+ memcpy(msg, _messagePtr, 18),
+ msg[18] = 0;
+ _messagePtr = msg;
+
+ // Draw it
drawString(1);
}