]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Fix completely broken dialog-building functions.
authorSimon Tatham <anakin@pobox.com>
Tue, 14 Feb 2017 21:15:02 +0000 (21:15 +0000)
committerSimon Tatham <anakin@pobox.com>
Tue, 14 Feb 2017 23:25:25 +0000 (23:25 +0000)
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.

windows/winctrls.c

index d5b962ae35f8251bd9719639fe77dcc857f5c781..a03967e6f81917a07e9669ea89448ba9b57098d7 100644 (file)
@@ -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);