Revision: 56529
http://sourceforge.net/p/brlcad/code/56529
Author: brlcad
Date: 2013-08-04 20:31:32 +0000 (Sun, 04 Aug 2013)
Log Message:
-----------
unclear to me why there's padding on this allocation
Modified Paths:
--------------
brlcad/trunk/src/libged/png.c
Modified: brlcad/trunk/src/libged/png.c
===================================================================
--- brlcad/trunk/src/libged/png.c 2013-08-04 20:16:36 UTC (rev 56528)
+++ brlcad/trunk/src/libged/png.c 2013-08-04 20:31:32 UTC (rev 56529)
@@ -327,15 +327,11 @@
png_structp png_p;
png_infop info_p;
double out_gamma = 1.0;
-#if 1
+
+ /* TODO: explain why this is size+1 */
size_t num_bytes_per_row = (size+1) * 3;
size_t num_bytes = num_bytes_per_row * (size+1);
unsigned char **image = (unsigned char **)bu_malloc(sizeof(unsigned char
*) * (size+1), "draw_png, image");
-#else
- size_t num_bytes_per_row = size * 3;
- size_t num_bytes = num_bytes_per_row * size;
- unsigned char **image = (unsigned char **)bu_malloc(sizeof(unsigned char
*) * size, "draw_png, image");
-#endif
unsigned char *bytes = (unsigned char *)bu_malloc(num_bytes, "draw_png,
bytes");
/* Initialize bytes using the background color */
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits