summaryrefslogtreecommitdiff
path: root/png2ff.c
diff options
context:
space:
mode:
authorFRIGN <dev@frign.de>2016-01-17 21:01:50 +0100
committerFRIGN <dev@frign.de>2016-01-17 21:01:50 +0100
commit42ace91b3ddba2fa40e0362ce7aba814aa7dd79c (patch)
tree1d5e8d2be548706168c829daf518c9fe8456a993 /png2ff.c
parent853b79b67c81735874acaeeab5293e9dd7af06bb (diff)
Fix gcc-optimization bug in png2ff
For some reason, those strange png_char_pp-passes were optimized away in some way, yielding in icc_len = 0. I now explicitly use the pointers to indicate to the compiler that we pass by reference. Fuck those png types...
Diffstat (limited to 'png2ff.c')
-rw-r--r--png2ff.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/png2ff.c b/png2ff.c
index aea7a50..97bcdce 100644
--- a/png2ff.c
+++ b/png2ff.c
@@ -35,8 +35,8 @@ main(int argc, char *argv[])
cmsToneCurve *gamma18, *out_curves[3];
png_structp png_struct_p;
png_infop png_info_p;
- png_bytepp png_row_p, icc_data = NULL;
- png_charpp icc_name = NULL;
+ png_bytep *png_row_p, icc_data;
+ png_charp icc_name;
uint32_t width, height, icc_len, outrowlen, tmp32, r, i;
uint16_t *inrow, *outrow;
int icc_compression;
@@ -72,8 +72,8 @@ main(int argc, char *argv[])
/* icc profile (output ProPhoto RGB) */
if (png_get_valid(png_struct_p, png_info_p, PNG_INFO_iCCP)) {
- png_get_iCCP(png_struct_p, png_info_p, icc_name,
- &icc_compression, icc_data, &icc_len);
+ png_get_iCCP(png_struct_p, png_info_p, &icc_name,
+ &icc_compression, &icc_data, &icc_len);
if (!(in_profile = cmsOpenProfileFromMem(icc_data,
icc_len)))
goto lcmserr;