avutil/softfloat: Fix dependence on signed overflow in av_normalize1_sf()
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 9 Oct 2014 14:37:26 +0000 (16:37 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 9 Oct 2014 14:52:56 +0000 (16:52 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavutil/softfloat.h

index 97e09ea..04c79bf 100644 (file)
@@ -57,7 +57,7 @@ static av_const SoftFloat av_normalize_sf(SoftFloat a){
 
 static inline av_const SoftFloat av_normalize1_sf(SoftFloat a){
 #if 1
 
 static inline av_const SoftFloat av_normalize1_sf(SoftFloat a){
 #if 1
-    if(a.mant + 0x40000000 < 0){
+    if((int32_t)(a.mant + 0x40000000U) < 0){
         a.exp++;
         a.mant>>=1;
     }
         a.exp++;
         a.mant>>=1;
     }