Fix small bug with negative item_no.

This commit is contained in:
Jordan K. Hubbard 1996-01-10 13:57:46 +00:00
parent b6607b59c8
commit 52abcf2c37
1 changed files with 1 additions and 1 deletions

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)*item_no)) == NULL) {
if ((status = alloca(sizeof(int) * abs(item_no))) == NULL) {
endwin();
fprintf(stderr, "\nCan't allocate memory in dialog_radiolist().\n");
exit(-1);