merged fix for small TGA2 files by Nick Lamb <njl195@zepler.org.uk> from

2001-08-02  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/tga.c: merged fix for small TGA2 files by
	 Nick Lamb <njl195@zepler.org.uk> from the stable branch.
This commit is contained in:
Sven Neumann
2001-08-02 09:02:37 +00:00
committed by Sven Neumann
parent abf1fb90eb
commit 2e4be9c83d
2 changed files with 12 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2001-08-02 Sven Neumann <sven@gimp.org>
* plug-ins/common/tga.c: merged fix for small TGA2 files by
Nick Lamb <njl195@zepler.org.uk> from the stable branch.
2001-08-01 Sven Neumann <sven@gimp.org>
* app/docindex.c

View File

@ -441,13 +441,15 @@ load_image (gchar *filename)
offset= footer[0] + (footer[1] * 256) + (footer[2] * 65536)
+ (footer[3] * 16777216);
if (fseek (fp, offset, SEEK_SET) ||
fread (extension, sizeof (extension), 1, fp) != 1) {
g_message (_("TGA: Cannot read extension from \"%s\"\n"), filename);
return -1;
if (offset != 0) {
if (fseek (fp, offset, SEEK_SET) ||
fread (extension, sizeof (extension), 1, fp) != 1) {
g_message (_("TGA: Cannot read extension from \"%s\"\n"), filename);
return -1;
}
/* Eventually actually handle version 2 TGA here */
}
/* Eventually actually handle version 2 TGA here */
}
}