git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@780
4a8a32a2-be11-0410-ad9d-
d568d2c75423
set *sp = *sset;
va_list ap;
- va_start (ap, cond);
-
while (sp)
{
+ // On the x86 va_list is just a pointer, so due to pass by value
+ // ap is not mofified by the called function. On the PPC va_list
+ // is a pointer to a structure, so ap is modified. Re-init each time.
+ va_start (ap, cond);
+
if ((*cond) (sp->item, ap))
{
deleteSetItem (sset, sp->item);
continue;
}
+ va_end(ap);
sp = sp->next;
}
}