Skip to content

Commit a795ed2

Browse files
committed
Upload file
1 parent 96c36e6 commit a795ed2

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

krscript/src/main/java/com/omarea/krscript/model/ShellHandlerBase.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,10 @@ protected void onReaderMsg(Object msg) {
100100

101101
// toast:[text...]
102102
if (log.startsWith("toast:[")) {
103-
int end = log.lastIndexOf("]");
104-
if (end > 0) {
105-
String text = log.substring("toast:[".length(), end);
103+
int end = log.lastIndexOf(']');
104+
if (end > "toast:[".length()) {
105+
String text = log.substring("toast:[".length(), end)
106+
.replace("\\n", "\n");
106107
onToast(text);
107108
}
108109
return;

0 commit comments

Comments
 (0)