aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/base/scriptables
diff options
context:
space:
mode:
authorlolbot-iichan2019-06-29 16:58:45 +0300
committerFilippos Karapetis2019-07-16 20:24:42 +0300
commited635a5b01f62497ecf064a330c93b478ea9dea1 (patch)
tree99e352e0d2f9bd51cb168368a77edad2c246c8db /engines/wintermute/base/scriptables
parent614dfdfbe353f07dcfe0b21a21e4f4bae702d83d (diff)
downloadscummvm-rg350-ed635a5b01f62497ecf064a330c93b478ea9dea1.tar.gz
scummvm-rg350-ed635a5b01f62497ecf064a330c93b478ea9dea1.tar.bz2
scummvm-rg350-ed635a5b01f62497ecf064a330c93b478ea9dea1.zip
WINTERMUTE: Fix File.WriteText method
Removed unnecessary '\0' byte written after a string. Reasons to remove: 1. Hamlet game does not write 0 after string when running this code: var SomeFile = new File((Game.SaveDirectory + "\gamelet.save")); SomeFile.OpenAsText(2); SomeFile.WriteText(LVL_N); SomeFile.Close(); 2. Original WME does not have this: https://github.com/retrowork/Wintermute-Engine/blob/master/src/engine_core/wme_base/SXFile.cpp#L303
Diffstat (limited to 'engines/wintermute/base/scriptables')
-rw-r--r--engines/wintermute/base/scriptables/script_ext_file.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/engines/wintermute/base/scriptables/script_ext_file.cpp b/engines/wintermute/base/scriptables/script_ext_file.cpp
index daded7057c..a9e2c8ccdd 100644
--- a/engines/wintermute/base/scriptables/script_ext_file.cpp
+++ b/engines/wintermute/base/scriptables/script_ext_file.cpp
@@ -346,7 +346,6 @@ bool SXFile::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
writeLine = Common::String::format("%s", line);
}
_writeFile->writeString(writeLine);
- _writeFile->writeByte(0);
stack->pushBool(true);
return STATUS_OK;