From 742304fb7327642de16096836e606986d05378e7 Mon Sep 17 00:00:00 2001 From: Thai Pangsakulyanont Date: Thu, 10 Mar 2011 00:36:23 +0700 Subject: [PATCH] fix crash --- src/NotesLoaderBMS.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/NotesLoaderBMS.cpp b/src/NotesLoaderBMS.cpp index 72b5caaa39..214f4045ee 100644 --- a/src/NotesLoaderBMS.cpp +++ b/src/NotesLoaderBMS.cpp @@ -784,7 +784,12 @@ static void ReadGlobalTags( const NameToData_t &mapNameToData, Song &out, Measur // this is keysound file name. Looks like "#WAV1A" RString sData = it->second; RString sWavID = sName.Right(2); - + + // FIXME: garbled song names seem to crash the app. + // this might not be the best place to put this code. + if( !utf8_is_valid(sData) ) + continue; + /* Due to bugs in some programs, many BMS files have a "WAV" extension * on files in the BMS for files that actually have some other extension. * Do a search. Don't do a wildcard search; if sData is "song.wav",