lzms_common.h: add cast needed if sizeof(int) > sizeof(u32)
authorEric Biggers <ebiggers3@gmail.com>
Fri, 5 Feb 2016 01:19:08 +0000 (19:19 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Tue, 9 Feb 2016 01:43:11 +0000 (19:43 -0600)
include/wimlib/lzms_common.h

index 56e3511..6db35b7 100644 (file)
@@ -119,7 +119,7 @@ lzms_get_probability(const struct lzms_probability_entry *prob_entry)
         *      if (prob == 0)
         *              prob++;
         */
-       prob += (prob - 1) >> 31;
+       prob += (u32)(prob - 1) >> 31;
 
        /*
         *      if (prob == LZMS_PROBABILITY_DENOMINATOR)