Skip to content

Commit 13449b7

Browse files
author
Bei Zhang
committed
GdbMiParser2.parseLine throws exception when given empty line. Checks for empty line before substring(0, 1)
1 parent 368ff87 commit 13449b7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/uk/co/cwspencer/gdb/gdbmi/GdbMiParser2.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ private String[] convertGoOutput(byte[] data) {
126126
}
127127

128128
private Boolean isGdbMiLine(String line) {
129+
if (line.length() < 1) {
130+
return false;
131+
}
129132
if (START_TOKENS.contains(line.substring(0, 1))) {
130133
return true;
131134
}

0 commit comments

Comments
 (0)