diff options
author | yinsimei | 2017-07-11 15:18:24 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2017-07-13 18:27:45 +0200 |
commit | d6308b91769c904421cc6c0470e34c743c903dfc (patch) | |
tree | 2a8ab0a3894b71f46c4b231eb2e40db584adf339 /engines/sludge | |
parent | 1cd6de22e409e3cdedbb909c0a71678252bb13ba (diff) | |
download | scummvm-rg350-d6308b91769c904421cc6c0470e34c743c903dfc.tar.gz scummvm-rg350-d6308b91769c904421cc6c0470e34c743c903dfc.tar.bz2 scummvm-rg350-d6308b91769c904421cc6c0470e34c743c903dfc.zip |
SLUDGE: replace utf8 chars by code
Diffstat (limited to 'engines/sludge')
-rw-r--r-- | engines/sludge/savedata.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/sludge/savedata.cpp b/engines/sludge/savedata.cpp index a315963dc5..77328db34e 100644 --- a/engines/sludge/savedata.cpp +++ b/engines/sludge/savedata.cpp @@ -31,6 +31,7 @@ namespace Sludge { +const char UTF8_CHECKER[] = {'U', 'N', -17, -65, -67, 'L', 'O', -17, -65, -67, 'C', 'K', 'E', 'D', '\0'}; uint16 saveEncoding = false; char encode1 = 0; char encode2 = 0; @@ -137,7 +138,7 @@ bool fileToStack(const Common::String &filename, stackHandler *sH) { if (saveEncoding) { checker = readStringEncoded(&fd); - if (checker == "UN�LO�CKED") { + if (checker == UTF8_CHECKER) { fd.close(); return fatal( LOAD_ERROR "The current file encoding setting does not match the encoding setting used when this file was created:", filename); @@ -206,7 +207,7 @@ bool stackToFile(const Common::String &filename, const variable &from) { if (saveEncoding) { fprintf(fp, "[Custom data (encoded)]\r\n"); - writeStringEncoded("UN�LO�CKED", fp); + writeStringEncoded(UTF8_CHECKER, fp); } else { fprintf(fp, "[Custom data (ASCII)]\n"); } |