]> git.cworth.org Git - apitrace/commitdiff
Ensure negation argument is signed.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Mon, 23 Apr 2012 11:20:25 +0000 (12:20 +0100)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Mon, 23 Apr 2012 11:20:25 +0000 (12:20 +0100)
common/image.hpp

index ea3eefb0d589c6e3f342860b8a1bd9720b3011bf..e930512f86473c89352a8990443cd9bbff40d622 100644 (file)
@@ -78,7 +78,7 @@ public:
     }
 
     inline signed stride(void) const {
-        return flipped ? -width*channels : width*channels;
+        return flipped ? -(signed)(width*channels) : width*channels;
     }
 
     bool writeBMP(const char *filename) const;