From: Simon Tatham Date: Tue, 14 Feb 2017 21:15:02 +0000 (+0000) Subject: Fix completely broken dialog-building functions. X-Git-Tag: 0.68~24 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=50965a6411b8da9301501e91262bfe6cf8c808ae;p=PuTTY.git Fix completely broken dialog-building functions. The loops that were supposed to count up the number of buttons in the variadic argument list forgot to increment the counter. On the other hand, these functions aren't actually _used_ anywhere in the current code - looks as if commit 616c837cf was the last time they were seen - but manual dialog stuff like PuTTYgen might yet find a use for them in future. --- diff --git a/windows/winctrls.c b/windows/winctrls.c index d5b962ae..a03967e6 100644 --- a/windows/winctrls.c +++ b/windows/winctrls.c @@ -301,6 +301,7 @@ void bareradioline(struct ctlpos *cp, int nacross, ...) if (!btext) break; (void) va_arg(ap, int); /* id */ + nbuttons++; } va_end(ap); buttons = snewn(nbuttons, struct radio); @@ -331,6 +332,7 @@ void radiobig(struct ctlpos *cp, char *text, int id, ...) if (!btext) break; (void) va_arg(ap, int); /* id */ + nbuttons++; } va_end(ap); buttons = snewn(nbuttons, struct radio);