Skip to content

Commit c8373a9

Browse files
authored
Fix rcutils_shared_library_t path on Windows. (#322)
GetModuleFileName() returns the size of the filename *minus* the null-terminating character. Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
1 parent 10dca5b commit c8373a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shared_library.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ rcutils_load_shared_library(
177177
continue;
178178
}
179179
lib->library_path = lib->allocator.reallocate(
180-
buffer, buffer_size, lib->allocator.state);
180+
buffer, buffer_size + 1, lib->allocator.state);
181181
if (NULL == lib->library_path) {
182182
lib->library_path = buffer;
183183
}

0 commit comments

Comments
 (0)