Allow the sentence line to be 40 printable characters long. The verb part

is padded with '@', which should not be counted.

svn-id: r9146
This commit is contained in:
Torbjörn Andersson 2003-07-23 14:33:57 +00:00
parent a327f805ac
commit e66bdf91b9

View File

@ -987,7 +987,20 @@ void Scumm_v2::o2_drawSentence() {
else
_string[2].color = 13;
sentence[41] = 0; // Maximal length: 40 characters
char *ptr = sentence;
int n = 0;
// Maximum length: 40 printable characters
while (*ptr != 0) {
if (*ptr != '@')
n++;
if (n > 40) {
*ptr = 0;
break;
}
ptr++;
}
_messagePtr = (byte*)sentence;
sentenceline.top = virtscr[2].topline;