Skip to content
Snippets Groups Projects
Commit 07a73c0f authored by Sandro Santilli's avatar Sandro Santilli
Browse files

Fix -Werror=format-truncation=1 warning on 32bit

See https://gitlab.com/postgis/postgis/-/jobs/6286428391
parent 8f341b2a
No related branches found
No related tags found
No related merge requests found
Pipeline #1196398796 failed
......@@ -269,7 +269,10 @@ colmap_read(const char *filename, colmap *map, char *errbuf, size_t errbuflen)
/* Error out if the dbffieldname is > 10 chars */
if (strlen(map->dbffieldnames[curmapsize]) > 10)
{
snprintf(errbuf, errbuflen, _("ERROR: column map file specifies a DBF field name \"%s\" which is longer than 10 characters"), map->dbffieldnames[curmapsize]);
if ( errbuflen <= snprintf(errbuf, errbuflen,
_("ERROR: column map file specifies a DBF field name \"%s\" which is longer than 10 characters"),
map->dbffieldnames[curmapsize])
) errbuf[errbuflen-1] = '\0';
return 0;
}
......
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