Commit 05f8120d authored by Monty's avatar Monty

Fixed compiler warning

Wrong compiler warning from GCC:
‘snprintf’ output 2 or more bytes (assuming 4001)
into a destination of size 4000
parent 76f14be1
...@@ -5235,7 +5235,11 @@ xb_process_datadir( ...@@ -5235,7 +5235,11 @@ xb_process_datadir(
goto next_datadir_item; goto next_datadir_item;
} }
snprintf(dbpath, sizeof(dbpath), "%s/%s", path, dbinfo.name); snprintf(dbpath, sizeof(dbpath), "%.*s/%.*s",
OS_FILE_MAX_PATH/2-1,
path,
OS_FILE_MAX_PATH/2-1,
dbinfo.name);
os_normalize_path(dbpath); os_normalize_path(dbpath);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment