From 09a0632481159f7eb733aa55fa356890a6ca256d Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 5 Mar 2003 10:07:20 +0000 Subject: [PATCH] Don't die due to invalid data. (We should be able to hose any given piece of any song and still load cleanly. It's fine to die due to things that shouldn't be bad--such as themes--but we should be very tolerant of songs.) --- stepmania/src/NoteData.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/stepmania/src/NoteData.cpp b/stepmania/src/NoteData.cpp index d88067db73..9caf1b7ae1 100644 --- a/stepmania/src/NoteData.cpp +++ b/stepmania/src/NoteData.cpp @@ -637,7 +637,14 @@ void NoteDataUtil::LoadFromSMNoteDataString( NoteData &out, CString sSMNoteData case '1': t = TAP_TAP; break; case '2': t = TAP_HOLD_HEAD; break; case '3': t = TAP_HOLD_TAIL; break; - default: ASSERT(0); t = TAP_EMPTY; break; + + default: + /* Invalid data. We don't want to assert, since there might + * simply be invalid data in an .SM, and we don't want to die + * due to invalid data. We should probably check for this when + * we load SM data for the first time ... */ + // ASSERT(0); + t = TAP_EMPTY; break; } out.SetTapNote(c, iIndex, t);