diff options
author | Marti Maria <info@littlecms.com> | 2011-06-03 13:06:22 +0200 |
---|---|---|
committer | Marti Maria <info@littlecms.com> | 2011-06-03 13:06:22 +0200 |
commit | 959457c0de174de5ada2ee77083a0c2a6750fc12 (patch) | |
tree | 9ad3ed308f92c67d56ba3ba4c889a61f372d6b14 | |
parent | a3fe774c2f45a040044f120bc1ecb123df029a75 (diff) | |
download | lcms2.2rc2.tar.gz |
Fixed a bug in ReadRawTaglcms2.2rc2
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/cmsio0.c | 11 |
3 files changed, 12 insertions, 1 deletions
@@ -16,6 +16,7 @@ Chris Evans Lorenzo Ridolfi Robin Watts Shawn Pedersen +Andrew Brygin Special Thanks -------------- @@ -39,6 +39,7 @@ Fixed a bug that made crash black preservation on CMYK2CMYK devicelinks Added named color functionality Fixed a bug in black preservation and sligtly non-monotonic curves Added dictionary metatag support +Fixed a bug on ReadRAWtag 2.2 Maintenance release diff --git a/src/cmsio0.c b/src/cmsio0.c index 770e986..5fb542e 100644 --- a/src/cmsio0.c +++ b/src/cmsio0.c @@ -1460,7 +1460,10 @@ cmsBool CMSEXPORT cmsWriteTag(cmsHPROFILE hProfile, cmsTagSignature sig, const v if (data == NULL) { - cmsSignalError(cmsGetProfileContextID(hProfile), cmsERROR_NULL, "couldn't wite NULL to tag"); + i = _cmsSearchTag(Icc, sig, FALSE); + if (i >= 0) + Icc ->TagNames[i] = (cmsTagSignature) 0; + // Unsupported by now, reserved for future ampliations (delete) return FALSE; } @@ -1656,6 +1659,12 @@ cmsInt32Number CMSEXPORT cmsReadRawTag(cmsHPROFILE hProfile, cmsTagSignature sig // Serialize TypeHandler ->ContextID = Icc ->ContextID; TypeHandler ->ICCVersion = Icc ->Version; + + if (!_cmsWriteTypeBase(MemIO, TypeHandler ->Signature)) { + cmsCloseIOhandler(MemIO); + return 0; + } + if (!TypeHandler ->WritePtr(TypeHandler, MemIO, Object, TagDescriptor ->ElemCount)) { cmsCloseIOhandler(MemIO); return 0; |