author | waspe <waspe> | 2003-11-17 20:33:13 (UTC) |
---|---|---|
committer | waspe <waspe> | 2003-11-17 20:33:13 (UTC) |
commit | 9ea83d1fc66171dbbcf8d1d435eedbb75c346935 (patch) (unidiff) | |
tree | dac84f83e68d8a7a02418ec201e576920161155a | |
parent | 56f2b27abab0cbae7548b43be4509965b37e3a92 (diff) | |
download | opie-9ea83d1fc66171dbbcf8d1d435eedbb75c346935.zip opie-9ea83d1fc66171dbbcf8d1d435eedbb75c346935.tar.gz opie-9ea83d1fc66171dbbcf8d1d435eedbb75c346935.tar.bz2 |
bugfix in getHalfTone(int)
-rw-r--r-- | noncore/multimedia/tonleiter/tonleiterdatahelper.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp b/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp index 6b8a5bd..c52e0da 100644 --- a/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp +++ b/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp | |||
@@ -99,10 +99,8 @@ int Scale::noOfHaltones() | |||
99 | //**************************************************************************** | 99 | //**************************************************************************** |
100 | int Scale::getHalfTone(int id) | 100 | int Scale::getHalfTone(int id) |
101 | { | 101 | { |
102 | if(id>=0 && noOfHaltones()<id) | 102 | if(id>=0 && id<noOfHaltones()) |
103 | { | ||
104 | return halftones[id]; | 103 | return halftones[id]; |
105 | } | ||
106 | else | 104 | else |
107 | return 0; | 105 | return 0; |
108 | } | 106 | } |