diff options
author | Max Horn | 2003-06-13 09:24:00 +0000 |
---|---|---|
committer | Max Horn | 2003-06-13 09:24:00 +0000 |
commit | 77aa2fe000ef28f05480ad6f927fd17fc61156f9 (patch) | |
tree | 3865f14028e6e908059a946343b1d2a374a1e7e7 /scumm/verbs.cpp | |
parent | 36c50f10f3816aaad247b179da39971246162539 (diff) | |
download | scummvm-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/verbs.cpp')
-rw-r--r-- | scumm/verbs.cpp | 9 |
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); } |