i3/bat_warning.pl: fix out-of-range array index