From 07e7a0633e2bf4f0331a33501fd32088d5b5c170 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 23 Sep 2003 04:47:16 +0000 Subject: [PATCH] fix possible overrun --- stepmania/src/MsdFile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stepmania/src/MsdFile.cpp b/stepmania/src/MsdFile.cpp index dad7efecc8..086598213c 100644 --- a/stepmania/src/MsdFile.cpp +++ b/stepmania/src/MsdFile.cpp @@ -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 {