CppCheck: Tried to classify and marked some lines that weird.

This commit is contained in:
luxsie 2015-04-10 20:13:25 +08:00
parent cd23a2ecaf
commit 900389d857
7 changed files with 7 additions and 1 deletions

View file

@ -140,6 +140,7 @@ int decompress(unsigned char *out, unsigned char *in, unsigned int size)
unsigned int range = 0xFFFFFFFF;
unsigned int code = (in[1] << 24) | (in[2] << 16) | (in[3] << 8) | in[4];
// TODO:: Syphurith: There was a check against the unsigned char head. if (head < 0) would always be false.. I don't know are you tried to if (head > 0x80)?
if (head < 0) // Check if we have a valid starting byte.
{
// The dictionary header is invalid, the data is not compressed.