diff options
| author | Lode <lvandeve@gmail.com> | 2018-02-20 21:56:32 +0100 | 
|---|---|---|
| committer | Lode <lvandeve@gmail.com> | 2018-02-20 21:56:32 +0100 | 
| commit | 116f5b2ed7c4a9c6779ae291b79770727cbb11ad (patch) | |
| tree | b622bc037bd4f28435ef31da8826aba201416306 | |
| parent | 9ab58e31fbd0405236a861f9e7c1d6182fade30c (diff) | |
fix issue after merge
| -rw-r--r-- | lodepng.cpp | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/lodepng.cpp b/lodepng.cpp index c62a22f..98a8376 100644 --- a/lodepng.cpp +++ b/lodepng.cpp @@ -1531,7 +1531,7 @@ static unsigned encodeLZ77(uivector* out, Hash* hash,      for(;;)      {        if(chainlength++ >= maxchainlength) break; -      current_offset = hashpos <= (unsigned)(wpos?wpos - hashpos:wpos - hashpos + windowsize); +      current_offset = (unsigned)(hashpos <= wpos ? wpos - hashpos : wpos - hashpos + windowsize);        if(current_offset < prev_offset) break; /*stop when went completely around the circular buffer*/        prev_offset = current_offset; @@ -4331,7 +4331,7 @@ static unsigned readChunk_tEXt(LodePNGInfo* info, const unsigned char* data, siz      string2_begin = length + 1; /*skip keyword null terminator*/ -    length = (unsigned)(chunkLength < string2_begin?0:chunkLength - string2_begin); +    length = (unsigned)(chunkLength < string2_begin ? 0 : chunkLength - string2_begin);      str = (char*)lodepng_malloc(length + 1);      if(!str) CERROR_BREAK(error, 83); /*alloc fail*/ @@ -4459,7 +4459,7 @@ static unsigned readChunk_iTXt(LodePNGInfo* info, const LodePNGDecompressSetting      /*read the actual text*/      begin += length + 1; -    length = (unsigned)chunkLength < begin?0:(unsigned)chunkLength - begin; +    length = (unsigned)chunkLength < begin ? 0 : (unsigned)chunkLength - begin;      if(compressed)      {  | 
