skip sub-blocks (except the 1st) in GFX2MODE GIF extension
That's to be future proof and be able to add more data to this extension in the future !
This commit is contained in:
parent
cdcb4e93da
commit
c7e3850b9a
@ -4293,8 +4293,16 @@ void Load_GIF(T_IO_Context * context)
|
|||||||
label[size_to_read] = '\0';
|
label[size_to_read] = '\0';
|
||||||
image_mode = Constraint_mode_from_label(label);
|
image_mode = Constraint_mode_from_label(label);
|
||||||
GFX2_Log(GFX2_DEBUG, " mode = %s (%d)\n", label, image_mode);
|
GFX2_Log(GFX2_DEBUG, " mode = %s (%d)\n", label, image_mode);
|
||||||
Read_byte(GIF_file,&size_to_read);
|
|
||||||
free(label);
|
free(label);
|
||||||
|
Read_byte(GIF_file,&size_to_read);
|
||||||
|
// be future proof, skip following sub-blocks :
|
||||||
|
while (size_to_read!=0 && !File_error)
|
||||||
|
{
|
||||||
|
if (fseek(GIF_file,size_to_read,SEEK_CUR) < 0)
|
||||||
|
File_error = 1;
|
||||||
|
if (!Read_byte(GIF_file,&size_to_read))
|
||||||
|
File_error = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -4303,8 +4311,10 @@ void Load_GIF(T_IO_Context * context)
|
|||||||
Read_byte(GIF_file,&size_to_read);
|
Read_byte(GIF_file,&size_to_read);
|
||||||
while (size_to_read!=0 && !File_error)
|
while (size_to_read!=0 && !File_error)
|
||||||
{
|
{
|
||||||
fseek(GIF_file,size_to_read,SEEK_CUR);
|
if (fseek(GIF_file,size_to_read,SEEK_CUR) < 0)
|
||||||
Read_byte(GIF_file,&size_to_read);
|
File_error = 1;
|
||||||
|
if (!Read_byte(GIF_file,&size_to_read))
|
||||||
|
File_error = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user