mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-06-27 16:26:38 +02:00
fixing image search path loading after switching to snprintf
This commit is contained in:
parent
06cef55723
commit
cd7480ce45
1 changed files with 1 additions and 1 deletions
|
@ -623,7 +623,7 @@ sexp sexp_load_image (const char* filename, off_t offset, sexp_uint_t heap_free_
|
|||
for (mod_path=all_paths[i]; *mod_path; mod_path=colon+1) {
|
||||
colon = strchr(mod_path, ':');
|
||||
end = colon ? colon : mod_path + strlen(mod_path);
|
||||
snprintf(path, end-mod_path, "%s", mod_path);
|
||||
snprintf(path, sizeof(path), "%s", mod_path);
|
||||
if (end[-1] != '/') path[end-mod_path] = '/';
|
||||
len = (end-mod_path) + (end[-1] == '/' ? 0 : 1);
|
||||
snprintf(path + len, sizeof(path) - len, "%s", filename);
|
||||
|
|
Loading…
Add table
Reference in a new issue