Skip to content

Commit 56ebfa1

Browse files
committed
zstr->len to ZSTR_VAL(zstr)
1 parent ae6c172 commit 56ebfa1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/random/random.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,7 +1481,7 @@ PHP_METHOD(Random_Engine_XorShift128Plus, __construct)
14811481
} else {
14821482
if (str_seed) {
14831483
/* char (8 bit) * 16 = 128 bits */
1484-
if (str_seed->len == 16) {
1484+
if (ZSTR_LEN(str_seed) == 16) {
14851485
/* Endianness safe copy */
14861486
for (i = 0; i < 2; i++) {
14871487
state->s[i] = 0;
@@ -1551,7 +1551,7 @@ PHP_METHOD(Random_Engine_Xoshiro256StarStar, __construct)
15511551
} else {
15521552
if (str_seed) {
15531553
/* char (8 bit) * 32 = 256 bits */
1554-
if (str_seed->len == 32) {
1554+
if (ZSTR_LEN(str_seed) == 32) {
15551555
/* Endianness safe copy */
15561556
for (i = 0; i < 4; i++) {
15571557
state->s[i] = 0;

0 commit comments

Comments
 (0)