[Scummvm-cvs-logs] CVS: scummvm/scumm string.cpp,1.82,1.83

Pawel Kolodziejski aquadran at users.sourceforge.net
Thu Jan 30 23:16:06 CET 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv24592

Modified Files:
	string.cpp 
Log Message:
increased buffer

Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- string.cpp	30 Jan 2003 09:01:07 -0000	1.82
+++ string.cpp	31 Jan 2003 07:15:53 -0000	1.83
@@ -836,7 +836,7 @@
 
 void Scumm::translateText(byte *text, byte *trans_buff) {
 	if ((_existLanguageFile == true) && (text[0] == '/') && (text[1] != ' ')) {
-		char name[20], tmp[200], tmp2[20], num_s[20], number[4];
+		char name[20], tmp[500], tmp2[20], num_s[20], number[4];
 		int32 num, l, j, k, r, pos;
 		char enc;
 
@@ -857,7 +857,8 @@
 				l = 0;
 				do {
 					tmp[l++] = buf[pos++];
-				} while((buf[pos] != 0) && (buf[pos] != 0x0d) && (buf[pos + 1] != 0x0a) && (l < 199));
+					assert(l < 499);
+				} while((buf[pos] != 0) && (buf[pos] != 0x0d) && (buf[pos + 1] != 0x0a));
 				tmp[l] = 0;
 				pos += 2;
 				l = 0;





More information about the Scummvm-git-logs mailing list