summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--minidump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/minidump.c b/minidump.c
index 9395f74..76187ca 100644
--- a/minidump.c
+++ b/minidump.c
@@ -1134,7 +1134,7 @@ static int minidump_write_string(struct context *c, const char *s, size_t *offse
/* We just care about ASCII, so the conversion to UTF16 is trivial */
le = htole16(s[i]);
- memcpy(h.buffer + i, &le, 2);
+ memcpy((uint8_t*) p + offsetof(struct minidump_string, buffer) + (2 * i), &le, 2);
/* FIXME: We should have proper UTF8 → UTF16 conversion here */
}