When the width is exactly a multiple of SLICE_W (currently 256), heap buffer overflow is reported by Address Sanitizer. So adjust the maximum index for the line array accordingly.