aboutsummaryrefslogtreecommitdiffstats
path: root/src/zload.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/zload.c')
-rw-r--r--src/zload.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/zload.c b/src/zload.c
index 3ab939d..03bcbb9 100644
--- a/src/zload.c
+++ b/src/zload.c
@@ -8,9 +8,9 @@ zload(z_t a, const void *buffer)
const char *buf = buffer;
a->sign = *((const int *)buf), buf += sizeof(int);
a->used = *((const size_t *)buf), buf += sizeof(size_t);
- if (a->sign) {
+ if (EXPECT(!!a->sign, 1)) {
ENSURE_SIZE(a, a->used);
- zmemcpy(a->chars, buf, a->used);
+ zmemcpy(a->chars, (const zahl_char_t *)buf, a->used);
}
return sizeof(int) + sizeof(size_t) + (zzero(a) ? 0 : a->used * sizeof(zahl_char_t));
}