From dd0c169d62d0c9ae6bc0235b522e27775a4e3e9f Mon Sep 17 00:00:00 2001 From: kkolyan Date: Mon, 8 Jun 2020 04:29:57 +0300 Subject: [PATCH] avoid NegativeArraySizeException if input string is "\\#FFF#" --- jme3-core/src/main/java/com/jme3/font/ColorTags.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/font/ColorTags.java b/jme3-core/src/main/java/com/jme3/font/ColorTags.java index 50f7077b2..b5717ab89 100644 --- a/jme3-core/src/main/java/com/jme3/font/ColorTags.java +++ b/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;