diff options
| author | Littleboy | 2011-06-23 05:42:48 -0400 |
|---|---|---|
| committer | Littleboy | 2011-06-23 08:52:52 -0400 |
| commit | b694a78f62a02253bca2a5611314599ae7fce725 (patch) | |
| tree | 115573b00e3b025ed334f9eadeadfb6161286089 /engines/m4/dialogs.cpp | |
| parent | 7a96e0bfb67e9b5b8c0aa9bdae8415fb98214c3f (diff) | |
| download | scummvm-rg350-b694a78f62a02253bca2a5611314599ae7fce725.tar.gz scummvm-rg350-b694a78f62a02253bca2a5611314599ae7fce725.tar.bz2 scummvm-rg350-b694a78f62a02253bca2a5611314599ae7fce725.zip | |
ANALYSIS: Add static casts to is* functions
This fixes a potential problem with passing char values that would be sign-extended and yield unexpected results.
See http://msdn.microsoft.com/en-us/library/ms245348.aspx
Diffstat (limited to 'engines/m4/dialogs.cpp')
| -rw-r--r-- | engines/m4/dialogs.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/m4/dialogs.cpp b/engines/m4/dialogs.cpp index 390ca711d1..2b2c479673 100644 --- a/engines/m4/dialogs.cpp +++ b/engines/m4/dialogs.cpp @@ -265,7 +265,7 @@ void Dialog::setupInputArea() { */ bool Dialog::matchCommand(const char *s1, const char *s2) { bool result = scumm_strnicmp(s1, s2, strlen(s2)) == 0; - _commandCase = isupper(*s1); + _commandCase = isupper(static_cast<unsigned char>(*s1)); return result; } |
