We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 96c36e6 commit a795ed2Copy full SHA for a795ed2
1 file changed
krscript/src/main/java/com/omarea/krscript/model/ShellHandlerBase.java
@@ -100,9 +100,10 @@ protected void onReaderMsg(Object msg) {
100
101
// toast:[text...]
102
if (log.startsWith("toast:[")) {
103
- int end = log.lastIndexOf("]");
104
- if (end > 0) {
105
- String text = log.substring("toast:[".length(), end);
+ int end = log.lastIndexOf(']');
+ if (end > "toast:[".length()) {
+ String text = log.substring("toast:[".length(), end)
106
+ .replace("\\n", "\n");
107
onToast(text);
108
}
109
return;
0 commit comments