From 9215d0d3ff1d6a8fe50e868cd576bca6deddcff4 Mon Sep 17 00:00:00 2001 From: NewGarbo Date: Tue, 26 Jan 2016 18:40:55 +0000 Subject: [PATCH] NegativeArraySizeException fix --- .../src/mineplex/core/common/util/UtilText.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilText.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilText.java index 360a418c2..92b4eb728 100644 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilText.java +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilText.java @@ -614,6 +614,11 @@ public class UtilText public static String repeat(String txt, int times) { + if (times <= 0) + { + return new String(); + } + return new String(new byte[times]).replace("\0", txt); }