diff options
author | Mitya Selivanov <automainint@guattari.tech> | 2023-09-15 15:22:06 +0200 |
---|---|---|
committer | Mitya Selivanov <automainint@guattari.tech> | 2023-09-15 15:22:06 +0200 |
commit | 792066308352552f541781bde2c1ba1db9690c56 (patch) | |
tree | d8a6c8f03f3ed2b2489db0277e19e30346fafd7d /source | |
parent | 2742713e53440e7bdb61e554c3f0fca70513033a (diff) | |
download | kit-792066308352552f541781bde2c1ba1db9690c56.zip |
shared_memory: fix
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) { |