fix uninitialized warning
fix uninitialized warning

`index` might be uninitialized. Warning can be produced with gcc and `-01` flag.

SirCmpwn/wlroots,swaywm/wlroots,ascent12/wlroots,swaywm/wlroots,ascent12/wlroots