applied part of a patch from John Marshall that fixes handling of the

2007-07-06  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/psd-load.c (do_layer_record): applied part of a
	patch from John Marshall that fixes handling of the short layer
	name (bug #445316).

svn path=/trunk/; revision=22888
This commit is contained in:
Sven Neumann
2007-07-06 12:44:50 +00:00
committed by Sven Neumann
parent 9ab1cf582a
commit 361ecc6817
2 changed files with 12 additions and 5 deletions

View File

@ -1,3 +1,9 @@
2007-07-06 Sven Neumann <sven@gimp.org>
* plug-ins/common/psd-load.c (do_layer_record): applied part of a
patch from John Marshall that fixes handling of the short layer
name (bug #445316).
2007-07-06 Sven Neumann <sven@gimp.org> 2007-07-06 Sven Neumann <sven@gimp.org>
* app/xcf/xcf-load.c (xcf_load_image): marked two error messages * app/xcf/xcf-load.c (xcf_load_image): marked two error messages

View File

@ -1225,7 +1225,6 @@ do_layer_record (FILE *fd,
{ {
(*offset) += strlen (layer->name); (*offset) += strlen (layer->name);
IFDBG printf("\t\t\t\t\t\tLAYER NAME: '%s'\n", layer->name); IFDBG printf("\t\t\t\t\t\tLAYER NAME: '%s'\n", layer->name);
layer->name = sanitise_string (layer->name);
/* Layer name string lengths are padded to be divisible by 4 */ /* Layer name string lengths are padded to be divisible by 4 */
numpadchars = 4-((1+strlen(layer->name)) % 4); numpadchars = 4-((1+strlen(layer->name)) % 4);
@ -1237,6 +1236,8 @@ do_layer_record (FILE *fd,
throwchunk (numpadchars, fd, "layer record extra data block throw"); throwchunk (numpadchars, fd, "layer record extra data block throw");
(*offset) += numpadchars; (*offset) += numpadchars;
} }
layer->name = sanitise_string (layer->name);
} }
else else
{ {