Guard against negative array subscript