Fix off-by-one error for libretro