Skip to content

Commit acce344

Browse files
committed
Patched a quick [ugly] fix in for issue #179 (going to message by number)
1 parent e0c1fe3 commit acce344

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

load/dmbase.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,8 @@ msg_base = {
915915
return 1; // skip to next room
916916
}
917917
tmpPtr += inc;
918-
if ((tmpPtr >= 0) && (tmpPtr <= indices.length)) {
918+
try {
919+
if ((tmpPtr >= 0) && (tmpPtr <= indices.length)) {
919920
while (this.dispMsg(mBase, indices[tmpPtr], true)
920921
== null) {
921922
tmpPtr += inc;
@@ -927,7 +928,11 @@ msg_base = {
927928
if (inc == 1) {
928929
sBoard.scan_ptr = indices[tmpPtr];
929930
}
930-
}
931+
}
932+
} catch (e) {
933+
console.putmsg(yellow + "Uncaught exception from " +
934+
"dispMsg(): " + e.message + "\n");
935+
}
931936
break;
932937
default:
933938
console.putmsg(red + "\nUnexpected value from rcChoice: "

0 commit comments

Comments
 (0)