Skip to content
Snippets Groups Projects
Commit 5ea3dff0 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix GCC 12.2 warning

warning: ‘%s’ directive writing up to 16384 bytes into a region of size
between 1 and 16385 [-Wformat-overflow=]
parent 8cd7e62e
No related branches found
No related tags found
No related merge requests found
......@@ -364,8 +364,8 @@ int filepick(uifcapi_t *api, char *title, struct file_pick *fp, char *dir, char
}
#endif
backslash(cpath);
sprintf(cglob,"%s%s",cpath,(opts&UIFC_FP_MSKCASE)?cmsk:insensitive_mask(cmsk));
sprintf(dglob,"%s*",cpath);
snprintf(cglob, sizeof(cglob), "%s%s",cpath,(opts&UIFC_FP_MSKCASE)?cmsk:insensitive_mask(cmsk));
snprintf(dglob, sizeof(dglob), "%s*",cpath);
switch(currfield) {
case DIR_LIST:
if(lastfield==DIR_LIST)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment