diff options
Diffstat (limited to 'ext/shmop/shmop.c')
-rw-r--r-- | ext/shmop/shmop.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c index 1b77c35f26..cf2084a743 100644 --- a/ext/shmop/shmop.c +++ b/ext/shmop/shmop.c @@ -327,8 +327,8 @@ PHP_FUNCTION(shmop_write) RETURN_FALSE; } - writesize = (data->len < shmop->size - offset) ? data->len : shmop->size - offset; - memcpy(shmop->addr + offset, data->val, writesize); + writesize = (ZSTR_LEN(data) < shmop->size - offset) ? ZSTR_LEN(data) : shmop->size - offset; + memcpy(shmop->addr + offset, ZSTR_VAL(data), writesize); RETURN_LONG(writesize); } |