1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-30 14:15:13 +00:00

[jsinterp] Improve zeroise (#12313)

Authored by: seproDev
This commit is contained in:
sepro
2025-02-09 22:37:23 +01:00
committed by GitHub
parent 241ace4f10
commit 4ca8c44a07
3 changed files with 15 additions and 1 deletions

View File

@@ -25,7 +25,7 @@ def _js_bit_op(op):
with contextlib.suppress(TypeError):
if math.isnan(x): # NB: NaN cannot be checked by membership
return 0
return x
return int(float(x))
def wrapped(a, b):
return op(zeroise(a), zeroise(b)) & 0xffffffff