]> git.cworth.org Git - apitrace/commitdiff
image: Fix allocation of floating point images.
authorJosé Fonseca <jfonseca@vmware.com>
Thu, 12 Sep 2013 16:21:37 +0000 (17:21 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 12 Sep 2013 16:21:37 +0000 (17:21 +0100)
image/image.hpp

index e36bdd0a2c174560dca1643da738adae1c3cdcbd..1b21acd1e2e5a51d004b6df605ed7a68cde520ae 100644 (file)
@@ -64,7 +64,7 @@ public:
         channelType(t),
         bytesPerPixel(channels * (t == TYPE_FLOAT ? 4 : 1)),
         flipped(f),
-        pixels(new unsigned char[h*w*c])
+        pixels(new unsigned char[h*w*bytesPerPixel])
     {}
 
     inline ~Image() {