File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -648,10 +648,14 @@ msg_base = {
648648 //is bogus before we waste time with this, especially since the mHdr
649649 //===null tested block doesn't seem to keep horrible things from
650650 //happening with a ptr passed that's way out of range
651- if ( ( ptr < 1 ) || ( ptr > base . last_msg ) ) {
651+ if ( ptr < 1 ) {
652652 //shit's out of range, man
653653 throw new docIface . dDocException ( "dispMsg() error" ,
654654 "Invalid message slot" , 3 ) ;
655+ } else if ( ptr > base . last_msg ) {
656+ console . putmsg ( yellow + "Your message # was over the top; " +
657+ "pointing you at the last message\n" ) ;
658+ ptr = base . last_msg ;
655659 }
656660
657661 //try/catch this
@@ -661,7 +665,7 @@ msg_base = {
661665 } catch ( e ) {
662666 console . putmsg ( red + "Error fetching mHdr & mBody\nName: " + e . name +
663667 "\tNumber: " + e . number + "\nMessage: " + e . message + "\n" ) ;
664- throw new dDocException ( "dispMsg() Error" ,
668+ throw new docIface . dDocException ( "dispMsg() Error" ,
665669 "Unable to fetch message header/body" , 1 ) ;
666670 }
667671
You can’t perform that action at this time.
0 commit comments