
BUG OF THE MONTH | Suspicious formatting
V705 It is possible that ‘else’ block was forgotten or commented out, thus altering the program’s operation logics. NETDLG.CPP 1506
static int Net_Join_Dialog(void) { .... /*............................................................... F4/SEND/'M' = edit a message ...............................................................*/ if (Messages.Get_Edit_Buf()==NULL) { .... } else /*............................................................... If we're already editing a message and the user clicks on 'Send', translate our input to a Return so Messages.Input() will work properly. ...............................................................*/ if (input==(BUTTON_SEND | KN_BUTTON)) { input = KN_RETURN; } .... }
Due to a large comment, the developer hasn’t seen the above unfinished conditional operator. The remaining else keyword forms the else if construction with the condition below, which most likely changes the original logic.
Please click here to see more bugs from this project.