]> git.saurik.com Git - wxWidgets.git/blobdiff - src/tiff/tif_dumpmode.c
Warning fix and source cleaning.
[wxWidgets.git] / src / tiff / tif_dumpmode.c
index 2c1e2b9f78427a1dfb7994f860f44f1b1ed28f15..ccb57f71c10f4eb7ca163b1d6109770dd1038ba1 100644 (file)
@@ -30,6 +30,7 @@
  * "Null" Compression Algorithm Support.
  */
 #include "tiffiop.h"
+#include <assert.h>
 
 /*
  * Encode a hunk of pixels.
@@ -44,6 +45,9 @@ DumpModeEncode(TIFF* tif, tidata_t pp, tsize_t cc, tsample_t s)
                n = cc;
                if (tif->tif_rawcc + n > tif->tif_rawdatasize)
                        n = tif->tif_rawdatasize - tif->tif_rawcc;
+
+                assert( n > 0 );
+                
                /*
                 * Avoid copy if client has setup raw
                 * data buffer to avoid extra copy.