diff options
Diffstat (limited to 'engines/sci/engine/kstring.cpp')
-rw-r--r-- | engines/sci/engine/kstring.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp index c3c10bd2a2..9f10691767 100644 --- a/engines/sci/engine/kstring.cpp +++ b/engines/sci/engine/kstring.cpp @@ -238,14 +238,14 @@ reg_t kFormat(EngineState *s, int argc, reg_t *argv) { /* int writelength; -- unused atm */ - if (xfer && (isdigit(xfer) || xfer == '-' || xfer == '=')) { + if (xfer && (isdigit(static_cast<unsigned char>(xfer)) || xfer == '-' || xfer == '=')) { char *destp; if (xfer == '0') fillchar = '0'; else if (xfer == '=') align = ALIGN_CENTER; - else if (isdigit(xfer) || (xfer == '-')) + else if (isdigit(static_cast<unsigned char>(xfer)) || (xfer == '-')) source--; // Go to start of length argument str_leng = strtol(source, &destp, 10); @@ -427,7 +427,7 @@ reg_t kGetFarText(EngineState *s, int argc, reg_t *argv) { } seeker = (char *)textres->data; - + // The second parameter (counter) determines the number of the string // inside the text resource. while (counter--) { @@ -715,7 +715,7 @@ reg_t kString(EngineState *s, int argc, reg_t *argv) { // triggers an assert when doing string2[i + index2]. for (uint16 i = 0; i < count; i++) string1->setValue(i + index1, string2[i + index2]); - + return strAddress; } case 7: { // Cmp @@ -781,14 +781,14 @@ reg_t kString(EngineState *s, int argc, reg_t *argv) { return NULL_REG; case 15: { // upper Common::String string = s->_segMan->getString(argv[1]); - + string.toUppercase(); s->_segMan->strcpy(argv[1], string.c_str()); return NULL_REG; } case 16: { // lower Common::String string = s->_segMan->getString(argv[1]); - + string.toLowercase(); s->_segMan->strcpy(argv[1], string.c_str()); return NULL_REG; |