fix possible overrun

This commit is contained in:
Glenn Maynard
2003-09-23 04:47:16 +00:00
parent 0d48725961
commit 07e7a0633e
+1 -1
View File
@@ -59,7 +59,7 @@ void MsdFile::ReadBuf( char *buf, int len )
int i = 0;
while(i < len)
{
if( buf[i] == '/' && buf[i+1] == '/' )
if( i+1 < len && buf[i] == '/' && buf[i+1] == '/' )
{
/* //; erase with spaces until newline */
do {