OSDN Git Service

eVocaloid対応歌詞の配列で添字上限チェックが抜けていたのを修正
authorAkiyoshi Kamide <kamide@yk.rim.or.jp>
Sun, 4 Jan 2015 08:51:42 +0000 (08:51 +0000)
committerAkiyoshi Kamide <kamide@yk.rim.or.jp>
Sun, 4 Jan 2015 08:51:42 +0000 (08:51 +0000)
git-svn-id: https://svn.sourceforge.jp/svnroot/midichordhelper/MIDIChordHelper@40 302f1594-2db2-43b1-aaa4-6307b5a2a2de

src/camidion/chordhelper/ChordHelperApplet.java
src/camidion/chordhelper/music/MIDISpec.java

index bc1a38c..22f7a85 100644 (file)
@@ -284,7 +284,7 @@ public class ChordHelperApplet extends JApplet {
         */\r
        public static class VersionInfo {\r
                public static final String      NAME = "MIDI Chord Helper";\r
-               public static final String      VERSION = "Ver.20140417.1";\r
+               public static final String      VERSION = "Ver.20150104.1";\r
                public static final String      COPYRIGHT = "Copyright (C) 2004-2014";\r
                public static final String      AUTHER = "@きよし - Akiyoshi Kamide";\r
                public static final String      URL = "http://www.yk.rim.or.jp/~kamide/music/chordhelper/";\r
index 0c0828e..0851a05 100644 (file)
@@ -1078,7 +1078,10 @@ public class MIDISpec {
                                                for( int i=6; i<msgdata.length; i++ ) {\r
                                                        int b = (msgdata[i] & 0xFF);\r
                                                        if( b == 0xF7 ) break;\r
-                                                       String s = b<0 ? "?": MIDISpec.nsx39LyricElements[b];\r
+                                                       String s = (\r
+                                                               b < 0 || b >= MIDISpec.nsx39LyricElements.length ?\r
+                                                               "?": MIDISpec.nsx39LyricElements[b]\r
+                                                       );\r
                                                        p.append(s);\r
                                                }\r
                                                str += " pronounce["+p+"]";\r