diff options
author | Richard Hughes <richard@hughsie.com> | 2012-05-08 22:40:59 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2012-05-08 22:40:59 +0100 |
commit | 989b55caaa729843cae5d3f7a36698edf9b0fc8f (patch) | |
tree | daba8c90ce5b414ffca3355bb4ee250186e3e6f2 | |
parent | efa679ec8c534cdd1a7bc7c4251ec119597d4686 (diff) | |
download | colord-989b55caaa729843cae5d3f7a36698edf9b0fc8f.tar.gz |
trivial: save the it8 file without the final '\0' byte
-rw-r--r-- | libcolord/cd-it8.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libcolord/cd-it8.c b/libcolord/cd-it8.c index 67b0bcf..2f4264e 100644 --- a/libcolord/cd-it8.c +++ b/libcolord/cd-it8.c @@ -820,12 +820,8 @@ cd_it8_save_to_file (CdIt8 *it8, GFile *file, GError **error) ret = cmsIT8SaveToMem (it8_lcms, data, (cmsUInt32Number *) &size); g_assert (ret); - /* workaround LCMS bug */ - if (data[size-1] != '\0') - data[size-1] = '\0'; - - /* save file */ - ret = g_file_replace_contents (file, data, size, NULL, + /* save file (without the last '\0' byte) */ + ret = g_file_replace_contents (file, data, size - 1, NULL, FALSE, G_FILE_CREATE_NONE, NULL, NULL, error); if (!ret) |