From 191b52a8dcc47c33e34d0dbfd7f95953ac1ad9ed Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Fri, 19 Feb 2016 15:16:15 +0100 Subject: [PATCH] silence array subscript warning --- lib/huff0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/huff0.c b/lib/huff0.c index 929bc87b..d1749372 100644 --- a/lib/huff0.c +++ b/lib/huff0.c @@ -1381,7 +1381,7 @@ size_t HUF_readDTableX6 (U32* DTable, const void* src, size_t srcSize) if (tableLog > memLog) return ERROR(tableLog_tooLarge); /* DTable is too small */ /* find maxWeight */ - for (maxW = tableLog; rankStats[maxW]==0; maxW--) {} /* necessarily finds a solution before 0 */ + for (maxW = tableLog; maxW && rankStats[maxW]==0; maxW--) {} /* necessarily finds a solution before 0 */ /* Get start index of each weight */ {