# HG changeset patch # User mhessling@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1303898354 0 # Node ID b5ae9cf15f688304a95a44a8d0ab25af6f4c6dfe # Parent 0ba3003272a17cd1566de9c7c801af5beea25e01 Fix for returning wrong extension in _dw_get_image_extension; only worked for .ico files diff -r 0ba3003272a1 -r b5ae9cf15f68 mac/dw.m --- a/mac/dw.m Wed Apr 27 09:00:53 2011 +0000 +++ b/mac/dw.m Wed Apr 27 09:59:14 2011 +0000 @@ -95,7 +95,7 @@ } if ( found_ext == 1 ) { - return image_exts[found_ext]; + return image_exts[i]; } return NULL; } @@ -7202,32 +7202,32 @@ else if([object isKindOfClass:[DWBox class]] || [object isKindOfClass:[NSControl class]]) { DWBox *parent = (DWBox *)[object superview]; - + if([parent isKindOfClass:[DWBox class]]) { Box *thisbox = [parent box]; int z, index = -1; Item *tmpitem, *thisitem = thisbox->items; - + [object removeFromSuperview]; /* Do we need to release? * [object release]; */ - + for(z=0;zcount;z++) { if(thisitem[z].hwnd == handle) index = z; } - + if(index == -1) { DW_MUTEX_UNLOCK; return 0; } - + tmpitem = malloc(sizeof(Item)*(thisbox->count-1)); - + /* Copy all but the current entry to the new list */ for(z=0;zitems = tmpitem; free(thisitem); - thisbox->count--; + thisbox->count--; } } DW_MUTEX_UNLOCK;