aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2016-01-03 00:29:18 +0100
committerEugene Sandulenko2016-01-03 00:29:18 +0100
commita210ff65a369b3463457470935d4eaf4679b0535 (patch)
tree23b1a8547bfe963fe630f013494f7e70ab045f52 /engines
parentc6a83d1e06fd96e49c8500306fd7d45de2c45e72 (diff)
downloadscummvm-rg350-a210ff65a369b3463457470935d4eaf4679b0535.tar.gz
scummvm-rg350-a210ff65a369b3463457470935d4eaf4679b0535.tar.bz2
scummvm-rg350-a210ff65a369b3463457470935d4eaf4679b0535.zip
WAGE; Fix stringOp reading
Diffstat (limited to 'engines')
-rw-r--r--engines/wage/script.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/engines/wage/script.cpp b/engines/wage/script.cpp
index 13b2617509..0a55360714 100644
--- a/engines/wage/script.cpp
+++ b/engines/wage/script.cpp
@@ -379,12 +379,14 @@ Script::Operand *Script::readStringOperand() {
sb = new String();
- byte c = 0x20;
- while (c >= 0x20 && c < 0x80) {
- c = _data->readByte();
+ while (true) {
+ byte c = _data->readByte();
if (c < '0' || c > '9')
allDigits = false;
- *sb += c;
+ if (c >= 0x20 && c < 0x80)
+ *sb += c;
+ else
+ break;
}
_data->seek(-1, SEEK_CUR);