Use the new COMP_MODE_SIZE constant instead of a magic number.

* plug-ins/file-psd/psd-load.c (add_merged_image): Use the new
COMP_MODE_SIZE constant instead of a magic number.

svn path=/trunk/; revision=26889
This commit is contained in:
Martin Nordholts 2008-09-06 15:22:30 +00:00
parent 9983251f8a
commit 9ae47b764f
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-09-06 Martin Nordholts <martinn@svn.gnome.org>
* plug-ins/file-psd/psd-load.c (add_merged_image): Use the new
COMP_MODE_SIZE constant instead of a magic number.
2008-09-06 Martin Nordholts <martinn@svn.gnome.org>
Bug 544939 PSD Plugin crash (maybe only PSD files created by

View File

@ -1440,7 +1440,7 @@ add_merged_image (const gint32 image_id,
block_end = block_start + block_len;
fseek (f, block_start, SEEK_SET);
if (fread (&comp_mode, 2, 1, f) < 1)
if (fread (&comp_mode, COMP_MODE_SIZE, 1, f) < 1)
{
psd_set_error (feof (f), errno, error);
return -1;