exr: fix out of bounds read in get_code