Closed abrenner closed 8 years ago
Taking a look, there's actually multiple issues here with the original code. On line 679 the '19' magic number is used again for an initialization. This should also be changed to 21.
Really, neither of these things should have been done in the first place (And looking at the git-blame, it seems to be my fault actually.). The real fix is to leave the [] empty in the initialization of the array (Which is legal, the C compiler will decide the size of the array based on the number elements given in the initialization). Then down below on 697, use the line sizeof(linkScreenHelp)/sizeof(linkScreenHelp[0])
to calculate the number of elements in the array. That way, elements can be added and removed without any worry of the wrong size being used.
I agree with @DSMan195276. I fixed it the way he suggested. Thanks for reporting.
The wide character initialization for the help screen was set to 19 but the list actually contained 21 elements. This produced a compiler warning and this commit removes that warning.
Signed-off-by: Adam Brenner aebrenne@uci.edu