mirror of
https://github.com/corda/corda.git
synced 2025-01-21 03:55:00 +00:00
fix format string in loadLibrary call to snprintf
"%*s" means "at least", whereas "%.*s" means at most, and the latter
is what I intended. This only became noticable as of 9f22a70
, when I
added another directory to the library path, which caused loadLibrary
to fail to find libraries in either directory.
This commit is contained in:
parent
ce9d7c35bb
commit
f9b3be0301
@ -221,7 +221,7 @@ loadLibrary(Thread* t, const char* path, const char* name, bool mapName,
|
|||||||
THREAD_RUNTIME_ARRAY(t, char, fullName, fullNameLength + 1);
|
THREAD_RUNTIME_ARRAY(t, char, fullName, fullNameLength + 1);
|
||||||
|
|
||||||
snprintf(RUNTIME_ARRAY_BODY(fullName), fullNameLength + 1,
|
snprintf(RUNTIME_ARRAY_BODY(fullName), fullNameLength + 1,
|
||||||
"%*s/%s", token.length, token.s, name);
|
"%.*s/%s", token.length, token.s, name);
|
||||||
|
|
||||||
lib = loadLibrary(t, RUNTIME_ARRAY_BODY(fullName));
|
lib = loadLibrary(t, RUNTIME_ARRAY_BODY(fullName));
|
||||||
if (lib) break;
|
if (lib) break;
|
||||||
|
Loading…
Reference in New Issue
Block a user