diff options
| author | Matt Hargett | 2002-09-22 03:53:53 +0000 |
|---|---|---|
| committer | Matt Hargett | 2002-09-22 03:53:53 +0000 |
| commit | 8390b0cc53b2025108eee9a8ea9ee7f411edd55e (patch) | |
| tree | 5ca2452114d38060824e0edee01ce7955132ad37 /scumm/string.cpp | |
| parent | fbe9c544de19cc4a7f28e2dbf1fdebaf351b83ee (diff) | |
| download | scummvm-rg350-8390b0cc53b2025108eee9a8ea9ee7f411edd55e.tar.gz scummvm-rg350-8390b0cc53b2025108eee9a8ea9ee7f411edd55e.tar.bz2 scummvm-rg350-8390b0cc53b2025108eee9a8ea9ee7f411edd55e.zip | |
2002-09-21 Matt Hargett <matt@use.net>
* scumm.dsp, scummvm.dsp, simon.dsp: Turn on warning as errors. Generate
PDBs on all builds.
* gameDetector.cpp, newgui.cpp, widget.cpp, actor.cpp,
dialogs.cpp, resource.cpp, saveload.cpp, scumm_renderer.cpp:
Fix warnings where possible. One pragma added to eliminate
warning of unknown pragmas.
* string.cpp: If unknown escape sequence, print warning.
svn-id: r4998
Diffstat (limited to 'scumm/string.cpp')
| -rw-r--r-- | scumm/string.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scumm/string.cpp b/scumm/string.cpp index 52747c1ca7..31b00f3342 100644 --- a/scumm/string.cpp +++ b/scumm/string.cpp @@ -621,7 +621,7 @@ void Scumm::drawString(int a) byte *Scumm::addMessageToStack(byte *msg) { int num, numorg; - byte *ptr, chr; + unsigned char *ptr, chr; numorg = num = _numInMsgStack; ptr = getResourceAddress(rtTemp, 6); @@ -640,7 +640,6 @@ while ((ptr[num++] = chr = *msg++) != 0) { if (chr == 0xff) { // 0xff is an escape character ptr[num++] = chr = *msg++; // followed by a "command" code - if (chr != 1 && chr != 2 && chr != 3 && chr != 8) { ptr[num++] = *msg++; // and some commands are followed by parameters to the functions below ptr[num++] = *msg++; // these are numbers of names, strings, verbs, variables, etc @@ -687,9 +686,11 @@ while ((ptr[num++] = chr = *msg++) != 0) { *_msgPtrToAdd++ = ptr[num++]; *_msgPtrToAdd++ = ptr[num++]; break; - default: + default: + warning("addMessageToStack(): string escape sequence %d unknown", chr); *_msgPtrToAdd++ = 0xFF; *_msgPtrToAdd++ = chr; + break; } } else { if (chr != '@') { |
