investigate StringIndexOutOfBounds

pull/5/head
Zlatin Balevsky 2019-06-21 16:29:52 +01:00
parent f794c39760
commit d27872cc8b
1 changed files with 2 additions and 1 deletions

View File

@ -97,7 +97,8 @@ class DownloadSession {
os.flush()
String codeString = readTillRN(is)
int space = codeString.indexOf(' ')
codeString = codeString.substring(0, space)
if (space > 0)
codeString = codeString.substring(0, space)
int code = Integer.parseInt(codeString.trim())