aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2018-10-27 22:09:01 -0700
committerPaul Gilbert2018-12-08 19:05:59 -0800
commitb23291b9777311d73363bd97f2392402d2b2eb6c (patch)
tree9e09912d025e8ae2c7ef685709b4af57073b331f
parent6807e646b48a7b3850496bda890809b53a3093f5 (diff)
downloadscummvm-rg350-b23291b9777311d73363bd97f2392402d2b2eb6c.tar.gz
scummvm-rg350-b23291b9777311d73363bd97f2392402d2b2eb6c.tar.bz2
scummvm-rg350-b23291b9777311d73363bd97f2392402d2b2eb6c.zip
GLK: SCOTT: Fix loading game data
-rw-r--r--engines/gargoyle/scott/scott.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/engines/gargoyle/scott/scott.cpp b/engines/gargoyle/scott/scott.cpp
index 9632408d46..d533a7ea44 100644
--- a/engines/gargoyle/scott/scott.cpp
+++ b/engines/gargoyle/scott/scott.cpp
@@ -325,7 +325,7 @@ char *Scott::ReadString(Common::SeekableReadStream *f) {
tmp[ct++] = c;
else
tmp[ct++] = '?';
- } while (1);
+ }
tmp[ct] = 0;
t = (char *)MemAlloc(ct + 1);
@@ -1263,15 +1263,11 @@ int Scott::xstrncasecmp(const char *s1, const char *s2, size_t n) {
void Scott::readInts(Common::SeekableReadStream *f, size_t count, ...) {
va_list va;
va_start(va, count);
- unsigned char c = '\0';
+ unsigned char c = f->readByte();
for (size_t idx = 0; idx < count; ++idx) {
- if (idx > 0) {
- while (f->pos() < f->size() && Common::isSpace(c))
- c = f->readByte();
- } else {
+ while (f->pos() < f->size() && Common::isSpace(c))
c = f->readByte();
- }
// Get the next value
int *val = (int *)va_arg(va, int);