diff src/dgif_lib.c @ 2062:00f374c78661

[xemacs-hg @ 2004-05-06 12:12:12 by malcolmp] GIF library crash fix.
author malcolmp
date Thu, 06 May 2004 12:12:13 +0000
parents abe6d1db359e
children 6c7605dfcf07
line wrap: on
line diff
--- a/src/dgif_lib.c	Wed May 05 22:09:18 2004 +0000
+++ b/src/dgif_lib.c	Thu May 06 12:12:13 2004 +0000
@@ -740,11 +740,11 @@
 	    case EXTENSION_RECORD_TYPE:
 		DGifGetExtension(GifFile,&sp->Function,&ExtData);
 		
-		do {
+		while (ExtData != NULL) {
     		    if (AddExtensionBlock(sp, ExtData[0], ExtData+1) == GIF_ERROR)
 			GifInternError(GifFile, D_GIF_ERR_NOT_ENOUGH_MEM);
 		    DGifGetExtensionNext(GifFile, &ExtData);
-		} while (ExtData != NULL);
+		}
 		break;
 
 	    case TERMINATE_RECORD_TYPE: