Skip to content

Commit

Permalink
SCI: Removed warning from kReadNumber
Browse files Browse the repository at this point in the history
  • Loading branch information
bluegr committed Mar 3, 2011
1 parent 78c0074 commit 18c0dae
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions engines/sci/engine/kstring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,17 +159,9 @@ reg_t kReadNumber(EngineState *s, int argc, reg_t *argv) {
source++;
}
while (*source) {
if ((*source < '0') || (*source > '9')) {
// Sierra's atoi stopped processing at anything which is not
// a digit. Sometimes the input has a trailing space, that's
// fine (example: lsl3)
if (*source != ' ') {
// TODO: this happens in lsl5 right in the intro -> we get '1' '3' 0xCD 0xCD 0xCD 0xCD 0xCD
// find out why this happens and fix it
warning("Invalid character in kReadNumber input");
}
if ((*source < '0') || (*source > '9'))
// Stop if we encounter anything other than a digit (like atoi)
break;
}
result *= 10;
result += *source - 0x30;
source++;
Expand Down

0 comments on commit 18c0dae

Please sign in to comment.