From a954373e6720131309b44e9a7426a5a54ab9e157 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 15 Feb 2003 23:16:06 +0000 Subject: [PATCH] fix crash when a file ends with a comment and no newline --- 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 5bf3c531b1..9a8962ede9 100644 --- a/stepmania/src/MsdFile.cpp +++ b/stepmania/src/MsdFile.cpp @@ -69,7 +69,7 @@ void MsdFile::ReadBuf( char *buf, int len ) do { buf[i] = ' '; i++; - } while(buf[i] != '\n'); + } while(i < len && buf[i] != '\n'); continue; }