Changeset - r23746:96edb054913b
[Not reviewed]
master
0 1 0
Michael Lutz - 6 years ago 2019-05-22 19:06:03
michi@icosahedron.de
Fix #7600: Don't read uninitialised memory when parsing GS language files.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/game/game_text.cpp
Show inline comments
 
@@ -111,7 +111,7 @@ std::unique_ptr<LanguageStrings> ReadRaw
 
			while (i > 0 && (buffer[i - 1] == '\r' || buffer[i - 1] == '\n' || buffer[i - 1] == ' ')) i--;
 
			buffer[i] = '\0';
 

	
 
			ret->lines.emplace_back(buffer, buffer + to_read - 1);
 
			ret->lines.emplace_back(buffer, i);
 

	
 
			if (len > to_read) {
 
				to_read = 0;
0 comments (0 inline, 0 general)