Skip to content
Snippets Groups Projects
Commit a63de490 authored by rswindell's avatar rswindell
Browse files

Fixed K_UPPER mode and max length support in uinput().

parent c9963bfa
No related branches found
No related tags found
No related merge requests found
......@@ -327,12 +327,14 @@ int uinput(int mode, char left, char top, char *prompt, char *outstr,
if(!(kmode&K_EDIT))
outstr[0]=0;
sprintf(str,"%.*s",sizeof(str)-1,outstr);
while(dialog_inputbox((char*)NULL, prompt, 9, max+4, outstr)==-2)
while(dialog_inputbox((char*)NULL, prompt, 9, max+4, str)==-2)
help();
if(kmode&K_UPPER) /* convert to uppercase? */
strupr(str);
if(strcmp(str,outstr))
if(strcmp(str,outstr)) { /* changed? */
api->changes=TRUE;
sprintf(outstr,"%.*s",max,str);
}
return strlen(outstr);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment