mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-20 01:49:40 +00:00
fix potential NPE and regex logic
This commit is contained in:
1 parent
4535d2ba7f
commit
605466e011
1 file changed
+1
-1
@@ -77,7 +77,7 @@ public class JavaTextContainer extends TextContainer {
|
||||
public void init(String text, int width, int height) {
|
||||
this.text = text == null ? "" : text.replaceAll("\\r?\\n|\\r", "\n");
|
||||
lines.clear();
|
||||
String[] split = text.split("\n", -1);
|
||||
String[] split = this.text.split("\n", -1);
|
||||
|
||||
int totalChars = 0;
|
||||
for (String l : split) {
|
||||
|
||||
Reference in new issue
Block a user