diff --git a/xtrn/DDMsgReader/DDMsgReader.js b/xtrn/DDMsgReader/DDMsgReader.js index cf110e34ae2cb094235b4c99d79cc10fc631d546..fd4f3d1460856d592dc4a5a1209860a0123a2169 100644 --- a/xtrn/DDMsgReader/DDMsgReader.js +++ b/xtrn/DDMsgReader/DDMsgReader.js @@ -123,6 +123,11 @@ * 2022-02-26 Eric Oulashin Version 1.45d * Fix for no group information available when displaying the * sub-board header above the message list when listing personal email + * 2022-03-07 Eric Oulashin Version 1.46 + * Fix: When changing to an empty sub-board from within the + * reader (either from read mode or list mode), it now properly + * says there are no messages and exits, rather than showing + * a list of bogus messages. */ @@ -243,8 +248,8 @@ if (system.version_num < 31500) } // Reader version information -var READER_VERSION = "1.45d"; -var READER_DATE = "2022-02-26"; +var READER_VERSION = "1.46"; +var READER_DATE = "2022-03-07"; // Keyboard key codes for displaying on the screen var UP_ARROW = ascii(24); @@ -1543,8 +1548,7 @@ function DigDistMsgReader_PopulateHdrsForCurrentSubBoard() } // Filter the headers into this.hdrsForCurrentSubBoard - if (tmpHdrs != null) - this.FilterMsgHdrsIntoHdrsForCurrentSubBoard(tmpHdrs, true); + this.FilterMsgHdrsIntoHdrsForCurrentSubBoard(tmpHdrs, true); } // For the DigDistMsgReader class: Takes an array of message headers in the current @@ -1563,6 +1567,8 @@ function DigDistMsgReader_FilterMsgHdrsIntoHdrsForCurrentSubBoard(pMsgHdrs, pCle this.hdrsForCurrentSubBoard = []; this.hdrsForCurrentSubBoardByMsgNum = {}; } + if (pMsgHdrs == null) + return; for (var prop in pMsgHdrs) { @@ -3495,6 +3501,13 @@ function DigDistMsgReader_ListMessages_Lightbar(pAllowChgSubBoard) var userChoice = msgListMenu.GetVal(drawMenu); drawMenu = true; var lastUserInputUpper = (typeof(msgListMenu.lastUserInput) == "string" ? msgListMenu.lastUserInput.toUpperCase() : msgListMenu.lastUserInput); + // If the user's last input is null, then something bad/weird must have + // happened, so don't continue the input loop. + if (lastUserInputUpper == null) + { + continueOn = false; + break; + } this.lightbarListSelectedMsgIdx = msgListMenu.selectedItemIdx; // If userChoice is a number, then it will be a message number for a message to read if (typeof(userChoice) == "number") diff --git a/xtrn/DDMsgReader/readme.txt b/xtrn/DDMsgReader/readme.txt index 03b6264c376ae788362ebe7cc2bd7a8a212632d6..66f9e8bd334d802162d6222eaa8d96b07165ec20 100644 --- a/xtrn/DDMsgReader/readme.txt +++ b/xtrn/DDMsgReader/readme.txt @@ -1,6 +1,6 @@ Digital Distortion Message Reader - Version 1.45d - Release date: 2022-02-26 + Version 1.46 + Release date: 2022-03-07 by diff --git a/xtrn/DDMsgReader/revision_history.txt b/xtrn/DDMsgReader/revision_history.txt index 4de7e5cecc5a492e4e9abf4742a430c66327fdf3..d27dce649fa451659888a7fb1e43da0715f2b34d 100644 --- a/xtrn/DDMsgReader/revision_history.txt +++ b/xtrn/DDMsgReader/revision_history.txt @@ -5,6 +5,11 @@ Revision History (change log) ============================= Version Date Description ------- ---- ----------- +1.46 2022-03-07 Fix: When changing to an empty sub-board from within the + reader (either from read mode or list mode), it now + properly says there are no messages and exits, rather than + showing a list of bogus messages. Unsure when this bug + was introduced. 1.45d 2022-02-26 Fix for no group information available when displaying the sub-board header above the message list when listing personal email