Only limit character count in GuiTextArea if it's positive

This commit is contained in:
CrushedPixel
2015-07-04 21:40:44 +02:00
parent 3813673ef6
commit 770c1da071

View File

@@ -231,7 +231,7 @@ public class GuiTextArea extends Gui implements GuiElement {
totalCharCount += line.length();
}
if(totalCharCount-(getSelectedText().length()) >= maxCharCount) {
if(maxCharCount > 0 && totalCharCount-(getSelectedText().length()) >= maxCharCount) {
return;
}