diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/kit/shared_memory.win32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/kit/shared_memory.win32.c b/source/kit/shared_memory.win32.c index 9ea3b5c..c660fcd 100644 --- a/source/kit/shared_memory.win32.c +++ b/source/kit/shared_memory.win32.c @@ -37,13 +37,13 @@ kit_shared_memory_t kit_shared_memory_open(kit_str_t name, i64 size, return mem; } - memcpy(buf + 7, name, name.size); + memcpy(buf + 7, name.values, name.size); buf[7 + name.size] = '\0'; HANDLE h = mode == KIT_SHARED_MEMORY_CREATE ? CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, size, buf) - : OpenFileMappingA(FILE_MAP_ALL_ACCESS, NULL, buf); + : OpenFileMappingA(FILE_MAP_ALL_ACCESS, 0, buf); assert(h != NULL); if (h == NULL) { |