Re: [Lcms-user] Troubles with cmsIT8SaveToMem

2012-05-08 Thread Richard Hughes
On 8 May 2012 16:02, wrote: > Yes, it is a bug. Thanks for reporting. There is a null byte \0 that > should be written at the end position and it is not. Yes, that's what I figured. > I'm fixing the code. A temporary solution would be to add the > null byte outside the function, as it is guaran

Re: [Lcms-user] Troubles with cmsIT8SaveToMem

2012-05-08 Thread marti . maria
Hi Richard, Yes, it is a bug. Thanks for reporting. There is a null byte \0 that should be written at the end position and it is not. The null terminator is not strictly needed, but is handy because then you get a C string and strlen() and others can work. I'm fixing the code. A temporary solut

[Lcms-user] Troubles with cmsIT8SaveToMem

2012-05-08 Thread Richard Hughes
Hey all, I'm trying to use cmsIT8SaveToMem to save a ti3 profile. I'm doing something like this: /* write the file */ ret = cmsIT8SaveToMem (it8, NULL, (cmsUInt32Number *) &size); g_assert (ret); data = g_malloc (size); ret = cmsIT8SaveToMem (it8, data, (cmsUInt32Number *) &size); g_assert (ret);