Skip to content

Commit 1816c56

Browse files
committed
Merge pull request #161 from dgets/hotfix
Made a quick code fix for overflowing scan_ptr (kludge) #140
2 parents a997a9a + 6e5b427 commit 1816c56

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

load/dmbase.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,21 @@ msg_base = {
227227
e.number + " back. :(\n");
228228
}
229229
break;
230+
case '%': //reset message pointer back to the start
231+
if (user.security.level >= 80) {
232+
var board = msg_area.sub[base.cfg.code];
233+
if (userSettings.debug.misc) {
234+
console.putmsg(yellow + "Resetting scan_ptr for: " +
235+
base.cfg.code + "\n");
236+
}
237+
238+
board.scan_ptr = 1;
239+
} else {
240+
console.putmsg(red + "Unable to reset scan_ptr for: " +
241+
base.cfg.code + " for " + user.alias + " due to " +
242+
"security level restrictions.");
243+
}
244+
break;
230245
default:
231246
console.putmsg(normal + yellow + "Invalid choice\n");
232247
break;

0 commit comments

Comments
 (0)