From 42ff1a89db077ede823425c75339ad235f047916 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 29 Jan 2012 22:16:15 +1100 Subject: [PATCH] MORTEVIELLE: Minor bugfixes to string extraction tool --- devtools/extract_mort/extract_mort.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/devtools/extract_mort/extract_mort.cpp b/devtools/extract_mort/extract_mort.cpp index 9e5641759be..192ea50723d 100644 --- a/devtools/extract_mort/extract_mort.cpp +++ b/devtools/extract_mort/extract_mort.cpp @@ -296,6 +296,9 @@ static void export_strings(const char *textFilename) { printf("Extracted string exceeded allowed buffer size.\n"); exit(1); } + + if (indis >= (txxInp.size() / 2)) + endFlag = true; } while (!endFlag); // Write out the string @@ -347,7 +350,7 @@ static void import_strings(const char *textFilename) { // Write out the compressed data if (point != 16) ++indis; - txxInp.write(strData, indis); + txxInp.write(strData, indis * 2); // Close the files txxInp.close();