wavpack: fix out of array access