From 2b16b99f4de8bc546f511bfd67038bb9073b0fb6 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 21 Sep 2008 02:46:53 +0000 Subject: [PATCH] - Fixed: The Timidity config parser always tried to process the note number, even if it wasn't specified. SVN r1239 (trunk) --- docs/rh-log.txt | 4 ++++ src/timidity/timidity.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index f0c351f61..c0b44d1c8 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,7 @@ +September 20, 2008 +- Fixed: The Timidity config parser always tried to process the note number, + even if it wasn't specified. + September 19, 2008 - Fixed: When UpdateJoystickMenu() modifies the menu items for different controllers, the joystick axis selectors need to NULL the d.graycheck diff --git a/src/timidity/timidity.cpp b/src/timidity/timidity.cpp index 521097ef1..3a4345dfb 100644 --- a/src/timidity/timidity.cpp +++ b/src/timidity/timidity.cpp @@ -383,7 +383,7 @@ static int read_config_file(const char *name, bool ismain) bank->tone[i].name = w[2]; bank->tone[i].fontbank = atoi(w[3]); bank->tone[i].fontpreset = atoi(w[4]); - if (bank->tone[i].fontbank == 128 || (w[5][0] >= '0' && w[5][0] <= '9')) + if (words > 5 && (bank->tone[i].fontbank == 128 || (w[5][0] >= '0' && w[5][0] <= '9'))) { bank->tone[i].fontnote = atoi(w[5]); j = 6;