summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2023-09-15 15:22:06 +0200
committerMitya Selivanov <automainint@guattari.tech>2023-09-15 15:22:06 +0200
commit792066308352552f541781bde2c1ba1db9690c56 (patch)
treed8a6c8f03f3ed2b2489db0277e19e30346fafd7d /source
parent2742713e53440e7bdb61e554c3f0fca70513033a (diff)
downloadkit-792066308352552f541781bde2c1ba1db9690c56.zip
shared_memory: fix
Diffstat (limited to 'source')
-rw-r--r--source/kit/shared_memory.win32.c4
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) {