Simon Budig <simon@gimp.org>

2000-12-31  Sven Neumann  <sven@gimp.org>
            Simon Budig <simon@gimp.org>

	* app/gimpbrush.c
	* plug-ins/common/gih.c: explicitely cast offset to (off_t) when
	seeking back. Should fix the problems reading grayscale BrushPipes
	on IRIX.
This commit is contained in:
Sven Neumann 2000-12-31 13:04:10 +00:00 committed by Sven Neumann
parent f16e01a237
commit f7ccaf1bcf
5 changed files with 12 additions and 4 deletions

View File

@ -1,3 +1,11 @@
2000-12-31 Sven Neumann <sven@gimp.org>
Simon Budig <simon@gimp.org>
* app/gimpbrush.c
* plug-ins/common/gih.c: explicitely cast offset to (off_t) when
seeking back. Should fix the problems reading grayscale BrushPipes
on IRIX.
2000-12-31 Michael Natterer <mitch@gimp.org>
* app/apptypes.h: cleaned up a bit.

View File

@ -353,7 +353,7 @@ gimp_brush_load_brush (gint fd,
else
{
/* rewind to make brush pipe loader happy */
if (lseek (fd, - sizeof (PatternHeader), SEEK_CUR) < 0)
if (lseek (fd, - ((off_t) sizeof (PatternHeader)), SEEK_CUR) < 0)
{
g_message (_("GIMP brush file appears to be corrupted: \"%s\"."),
filename);

View File

@ -353,7 +353,7 @@ gimp_brush_load_brush (gint fd,
else
{
/* rewind to make brush pipe loader happy */
if (lseek (fd, - sizeof (PatternHeader), SEEK_CUR) < 0)
if (lseek (fd, - ((off_t) sizeof (PatternHeader)), SEEK_CUR) < 0)
{
g_message (_("GIMP brush file appears to be corrupted: \"%s\"."),
filename);

View File

@ -353,7 +353,7 @@ gimp_brush_load_brush (gint fd,
else
{
/* rewind to make brush pipe loader happy */
if (lseek (fd, - sizeof (PatternHeader), SEEK_CUR) < 0)
if (lseek (fd, - ((off_t) sizeof (PatternHeader)), SEEK_CUR) < 0)
{
g_message (_("GIMP brush file appears to be corrupted: \"%s\"."),
filename);

View File

@ -542,7 +542,7 @@ gih_load_one_brush (gint fd,
}
g_free (plain_brush);
}
else if (lseek (fd, - sizeof (PatternHeader), SEEK_CUR) < 0)
else if (lseek (fd, - ((off_t) sizeof (PatternHeader)), SEEK_CUR) < 0)
{
g_message (_("GIMP brush file appears to be corrupted."));
g_free (name);