Browse Source

avoid NegativeArraySizeException if input string is "\\#FFF#"

kkolyan 5 years ago
parent
commit
dd0c169d62
1 changed files with 1 additions and 1 deletions
  1. 1 1
      jme3-core/src/main/java/com/jme3/font/ColorTags.java

+ 1 - 1
jme3-core/src/main/java/com/jme3/font/ColorTags.java

@@ -77,7 +77,7 @@ class ColorTags {
         }
         Matcher m = colorPattern.matcher(charSeq);
         if (m.find()) {
-            StringBuilder builder = new StringBuilder(charSeq.length()-7);
+            StringBuilder builder = new StringBuilder();
             int startIndex = 0;
             do {
                 String colorStr = null;