anv: fix off by one in array check
authorEric Engestrom <eric@engestrom.ch>
Sun, 3 Sep 2017 18:22:06 +0000 (19:22 +0100)
committerEric Engestrom <eric@engestrom.ch>
Mon, 4 Sep 2017 07:05:36 +0000 (08:05 +0100)
commit0c7272a66c633b0b11c0b81c0f3552201d083b3a
tree3254b06f20e75b293af8a1972aff1d8b23eec9d2
parent979be4f9c80a51c7294726bb75a00d5acbb0acc8
anv: fix off by one in array check

`anv_formats[ARRAY_SIZE(anv_formats)]` is already one too far.
Spotted by Coverity.

CovID: 1417259
Fixes: 242211933a0682696170 "anv/formats: Nicely handle unknown VkFormat enums"
Cc: Jason Ekstrand <jason.ekstrand@intel.com>
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
src/intel/vulkan/anv_formats.c