use explicit size of kErrorMessages[] arrays

Change-Id: If02864e3a07ae37814bf379bf347862cd2871bf4
This commit is contained in:
skal
2014-07-21 15:44:43 +02:00
committed by Pascal Massimino
parent 40b086f78a
commit 0b747b1b39
4 changed files with 4 additions and 4 deletions

View File

@ -194,7 +194,7 @@ static void DisplayGifError(const GifFileType* const gif, int gif_error) {
#endif
}
static const char* const kErrorMessages[] = {
static const char* const kErrorMessages[-WEBP_MUX_NOT_ENOUGH_DATA + 1] = {
"WEBP_MUX_NOT_FOUND", "WEBP_MUX_INVALID_ARGUMENT", "WEBP_MUX_BAD_DATA",
"WEBP_MUX_MEMORY_ERROR", "WEBP_MUX_NOT_ENOUGH_DATA"
};