From 1673f0174e7aa443f9a15640c9cc650e85d9f3fb Mon Sep 17 00:00:00 2001 From: Ruediger Hanke Date: Sun, 25 Aug 2002 22:25:18 +0000 Subject: German FT TRES file has a multiline string which caused an assertion failure svn-id: r4860 --- scumm/smush/player.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'scumm') 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 -- cgit v1.2.3