diff options
author | Ruediger Hanke | 2002-08-25 20:10:01 +0000 |
---|---|---|
committer | Ruediger Hanke | 2002-08-25 20:10:01 +0000 |
commit | b3f038b8dfc9e1ce239b906ffadd3356cb28c331 (patch) | |
tree | f588d206add947d8b39bf4f23ce981734ac15ca2 | |
parent | 73b031515eadf2865871f3a8a09df9627f7c113e (diff) | |
download | scummvm-rg350-b3f038b8dfc9e1ce239b906ffadd3356cb28c331.tar.gz scummvm-rg350-b3f038b8dfc9e1ce239b906ffadd3356cb28c331.tar.bz2 scummvm-rg350-b3f038b8dfc9e1ce239b906ffadd3356cb28c331.zip |
Fixing subtitles for German dig - TRES file is unencrypted in German version
svn-id: r4856
-rw-r--r-- | scumm/smush/frenderer.cpp | 1 | ||||
-rw-r--r-- | scumm/smush/player.cpp | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/scumm/smush/frenderer.cpp b/scumm/smush/frenderer.cpp index 741e853087..92044b056a 100644 --- a/scumm/smush/frenderer.cpp +++ b/scumm/smush/frenderer.cpp @@ -173,6 +173,7 @@ bool FontRenderer::drawStringCentered(const char * str, char * buffer, const Poi int * substr_widths = new int[nb_sub]; int space_width = charWidth(' '); + i = 0; while(i < nb_sub) { int substr_width = sizes[i]; char * substr = new char[1000]; diff --git a/scumm/smush/player.cpp b/scumm/smush/player.cpp index 99372f3d19..d3896dbe41 100644 --- a/scumm/smush/player.cpp +++ b/scumm/smush/player.cpp @@ -617,7 +617,10 @@ static StringResource * getStrings(const char * file, bool is_encoded) { static const int ETRS_HEADER_LENGTH = 16; assert(length > ETRS_HEADER_LENGTH); Chunk::type type = READ_BE_UINT32(filebuffer); - if(type != TYPE_ETRS) error("invalid type for file"); // mem leak !!! + if(type != TYPE_ETRS) { + delete [] filebuffer; + return getStrings(file, false); + } char * old = filebuffer; filebuffer = new char[length - ETRS_HEADER_LENGTH]; for(int i = ETRS_HEADER_LENGTH; i < length; i++) |