avoid calling toupper with posibly -ve value. fixes PR 21171

This commit is contained in:
dsl 2003-04-14 11:33:40 +00:00
parent 506c5eeb9e
commit 225615a61a
1 changed files with 1 additions and 2 deletions

View File

@ -142,8 +142,7 @@ void main(void)
printf("Enter destination drive: ");
scanf("%s", fname);
drive = fname[0];
drive = (islower(drive) ? toupper(drive) : drive) - 'A';
drive = (fname[0] - 'A') & 0xf;
printf("Please insert a formatted diskette into ");
printf("drive %c: and press -ENTER- :", drive + 'A');
while (bioskey(1) == 0) ; /* Wait... */