Fix segfault on right-click sweep of menu
commitc089c6aea4c948762e4f8098ddb84743356401cb
authorPetre Rodan <2b4eda@subdimension.ro>
Fri, 6 Jan 2023 04:58:11 +0000 (6 06:58 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Fri, 6 Jan 2023 12:47:22 +0000 (6 12:47 +0000)
tree2e1dff498335a33bf256c544f8d93e070e8a202e
parent66b0ee3c4daf5892db836879cd092ed22dc62c8d
Fix segfault on right-click sweep of menu

bug description: after menu is displayed I get a segfault when trying to hover over the last menu
entry. it looks like under some circumstances menu->entries[] gets accessed past the last valid
value (off by one).

how to reproduce:
right-click desktop to show menu and keep right mouse button pressed
sweep mouse up-down the menu a few times - it crashes all the time between 1-5 sweeps

this commit fixes the unwanted behaviour, in active use since december 2021.
src/menu.c