alloca() was being called with highly bogus arguments due to brain

fade.  Fixed.
This commit is contained in:
Jordan K. Hubbard 1996-04-25 01:50:18 +00:00
parent fdd92ff346
commit 02836a445d
2 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ dialog_checklist(unsigned char *title, unsigned char *prompt, int height, int wi
dialogMenuItem *ditems;
/* Allocate space for storing item on/off status */
if ((status = alloca(sizeof(int) * abs(item_no))) == NULL) {
if ((status = alloca(sizeof(int) * abs(cnt))) == NULL) {
endwin();
fprintf(stderr, "\nCan't allocate memory in dialog_checklist().\n");
exit(-1);

View File

@ -49,7 +49,7 @@ dialog_radiolist(unsigned char *title, unsigned char *prompt, int height, int wi
dialogMenuItem *ditems;
/* Allocate space for storing item on/off status */
if ((status = alloca(sizeof(int) * abs(item_no))) == NULL) {
if ((status = alloca(sizeof(int) * abs(cnt))) == NULL) {
endwin();
fprintf(stderr, "\nCan't allocate memory in dialog_radiolist().\n");
exit(-1);