Skip to content

Commit 87312a0

Browse files
committed
fixup! Handle zero seed in Xoshiro256**
1 parent e6f9878 commit 87312a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/random/engine_xoshiro256starstar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ PHP_METHOD(Random_Engine_Xoshiro256StarStar, __construct)
225225
}
226226
}
227227

228-
if (t[0] == 0 && t[1] == 0 && t[2] == 0 && t[3] == 0) {
228+
if (UNEXPECTED(t[0] == 0 && t[1] == 0 && t[2] == 0 && t[3] == 0)) {
229229
zend_argument_value_error(1, "must not consist entirely of NUL bytes");
230230
RETURN_THROWS();
231231
}

0 commit comments

Comments
 (0)