Skip to content

Commit e64b845

Browse files
committed
Fix typo that was unhiding only with USE_ZEND_ALLOC
1 parent 928d2cb commit e64b845

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/mysqlnd/mysqlnd_alloc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ PHPAPI extern struct st_mysqlnd_allocator_methods mysqlnd_allocator;
6969

7070
static inline MYSQLND_STRING mnd_dup_cstring(const MYSQLND_CSTRING str, const zend_bool persistent)
7171
{
72-
const MYSQLND_STRING ret = {(char*) mnd_pemalloc(str.l, persistent) + 1, str.l};
72+
const MYSQLND_STRING ret = {(char*) mnd_pemalloc(str.l + 1, persistent), str.l};
7373
if (ret.s) {
7474
memcpy(ret.s, str.s, str.l);
7575
ret.s[str.l] = '\0';

0 commit comments

Comments
 (0)