diff options
author | Johannes Schickel | 2009-10-11 13:44:19 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-10-11 13:44:19 +0000 |
commit | bd6de4f642ed81f6fa32565b1324003857f4bf45 (patch) | |
tree | 8b9574351e789dd29e2737c7df1f4b822f31986c /gui/ThemeLayout.h | |
parent | f4288516e80ec64aa262ccd8fcf61b1f8ce3fa09 (diff) | |
download | scummvm-rg350-bd6de4f642ed81f6fa32565b1324003857f4bf45.tar.gz scummvm-rg350-bd6de4f642ed81f6fa32565b1324003857f4bf45.tar.bz2 scummvm-rg350-bd6de4f642ed81f6fa32565b1324003857f4bf45.zip |
Hopefully avoiding an assert in the MSVC debug CRT library when entering an umlaut in the launcher.
It's a bad idea to cast a parameter to the "is*" functions from ctype.h to "char",
since "char" might be signed and the "is*" functions are defined to only accept
input which fits "unsigned char" or equals EOF. In this concrete example the value
of "state.ascii" is > 0x7F, thus becomes negative after the cast to "char", which
violates the parameter rules of "isprint".
Sadly it seems this is not the only place in our code, which does pass a possibly
signed parameter to an "is*" function. We might either want to change all code to
only pass an unsigned char value, change the code to do parameter validation or
fix it in another way.
svn-id: r44920
Diffstat (limited to 'gui/ThemeLayout.h')
0 files changed, 0 insertions, 0 deletions