loop never executes
Posted: 2010-02-20T12:19:58-07:00
While trying to figure out how delegates work, I ran across this code in image.c/SetImageInfo():
Since format_type is initialized to UndefinedFormatType, the first test in the while statement will immediately fail and the loop will never be executed.
I presume the first line of the while statement should be:
Pete
Code: Select all
/*
Look for explicit image formats.
*/
format_type=UndefinedFormatType;
i=0;
while ((format_type != UndefinedFormatType) &&
(format_type_formats[i] != (char *) NULL))
{
if ((*magic == *format_type_formats[i]) &&
(LocaleCompare(magic,format_type_formats[i]) == 0))
format_type=ExplicitFormatType;
i++;
}
I presume the first line of the while statement should be:
Code: Select all
while ((format_type == UndefinedFormatType) &&