aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2010-08-21 13:24:09 +0000
committerFilippos Karapetis2010-08-21 13:24:09 +0000
commit3faae2a83126a4bb731a49d731f1f6da407549ab (patch)
tree1592eec642514a22b429169c671cb4908cd1f85f /engines
parenta53d4dde6670947aa0943665e5786c482dd404b4 (diff)
downloadscummvm-rg350-3faae2a83126a4bb731a49d731f1f6da407549ab.tar.gz
scummvm-rg350-3faae2a83126a4bb731a49d731f1f6da407549ab.tar.bz2
scummvm-rg350-3faae2a83126a4bb731a49d731f1f6da407549ab.zip
Reverted part of r52256, it's not really undefined behavior (the two parts of the bitwise OR aren't reading from the same source)
svn-id: r52258
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/kfile.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index ed1b74f6a9..a9bdac103b 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -954,8 +954,7 @@ reg_t kFileIOReadByte(EngineState *s, int argc, reg_t *argv) {
FileHandle *f = getFileFromHandle(s, argv[0].toUint16());
if (!f)
return NULL_REG;
- byte b = f->_in->readByte();
- return make_reg(0, (s->r_acc.toUint16() & 0xff00) | b);
+ return make_reg(0, (s->r_acc.toUint16() & 0xff00) | f->_in->readByte());
}
reg_t kFileIOWriteByte(EngineState *s, int argc, reg_t *argv) {