diff options
author | Ruediger Hanke | 2002-08-25 22:25:18 +0000 |
---|---|---|
committer | Ruediger Hanke | 2002-08-25 22:25:18 +0000 |
commit | 1673f0174e7aa443f9a15640c9cc650e85d9f3fb (patch) | |
tree | e367299e704bd70b834100b350cc4e296cc70cd0 | |
parent | b295fd0bbd6a7ca55625adbd4b755f9ab847faeb (diff) | |
download | scummvm-rg350-1673f0174e7aa443f9a15640c9cc650e85d9f3fb.tar.gz scummvm-rg350-1673f0174e7aa443f9a15640c9cc650e85d9f3fb.tar.bz2 scummvm-rg350-1673f0174e7aa443f9a15640c9cc650e85d9f3fb.zip |
German FT TRES file has a multiline string which caused an assertion failure
svn-id: r4860
-rw-r--r-- | scumm/smush/player.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scumm/smush/player.cpp b/scumm/smush/player.cpp index d3896dbe41..25254fbacf 100644 --- a/scumm/smush/player.cpp +++ b/scumm/smush/player.cpp @@ -105,6 +105,19 @@ public: assert(value); memcpy(value, data_start, data_end - data_start); value[data_end - data_start] = 0; + char * line_start = value; + char * line_end; + while (line_end = strchr(line_start, '\n')) { + line_start = line_end+1; + if (line_start[0] == '/' && line_start[1] == '/') { + line_start += 2; + if (line_end[-1] == '\r') + line_end[-1] = ' '; + else + *line_end++ = ' '; + memmove(line_end, line_start, strlen(line_start)+1); + } + } #ifdef DEBUG debug(9, "Inserting (%s)%d == \"%s\"", idstring, id, value); #endif |