Changes between Initial Version and Version 1 of Ticket #4627, comment 2


Ignore:
Timestamp:
01/06/25 20:39:36 (3 days ago)
Author:
egmont
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4627, comment 2

    initial v1  
    11Inside `help_interactive_display()`, the `for` loop that initializes `history` leaves `history_ptr` at -1. 
    22 
    3 In `help_back()`, this value causes an out-of-bounds access to the `history` array. 
     3In `help_back()`, this value causes an out-of-bounds access to the `history` array, thus placing random noise in `currentpoint` and `selected_item`, the former used subsequently by `help_bg_callback()` and passed to `help_show()`. 
    44 
    55I guess the `for` loop should use `int i` as its counter, or reset `history_ptr = 0` afterwards. Pick whichever you prefer ;)