[3/9] windowscodecs: GIF Graphic Control Extension block belongs to the image which follows it.
Dmitry Timoshkov
dmitry at baikal.ru
Mon Sep 17 22:58:25 CDT 2012
---
dlls/windowscodecs/ungif.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/dlls/windowscodecs/ungif.c b/dlls/windowscodecs/ungif.c
index 66310cb..7984e3a 100644
--- a/dlls/windowscodecs/ungif.c
+++ b/dlls/windowscodecs/ungif.c
@@ -885,16 +885,19 @@ DGifSlurp(GifFileType * GifFile) {
case EXTENSION_RECORD_TYPE:
{
+ int Function;
Extensions *Extensions;
- if (GifFile->ImageCount)
+ if (DGifGetExtension(GifFile, &Function, &ExtData) == GIF_ERROR)
+ return (GIF_ERROR);
+
+ if (GifFile->ImageCount || Function == GRAPHICS_EXT_FUNC_CODE)
Extensions = &temp_save;
else
Extensions = &GifFile->Extensions;
- if (DGifGetExtension(GifFile, &Extensions->Function, &ExtData) ==
- GIF_ERROR)
- return (GIF_ERROR);
+ Extensions->Function = Function;
+
while (ExtData != NULL) {
/* Create an extension block with our data */
--
1.7.11.6
More information about the wine-patches
mailing list