cdgraphics: Fix out of array write