[jsinterp] Fix division (#7279)

* Fixes nsig decryption for Youtube JS player `8c7583ff`

Authored by: bashonly
This commit is contained in:
bashonly
2023-06-10 17:49:12 -05:00
committed by GitHub
parent 4f7b11cc1c
commit b4a252fba8
3 changed files with 12 additions and 1 deletions

View File

@@ -44,7 +44,7 @@ def _js_arith_op(op):
def _js_div(a, b):
if JS_Undefined in (a, b) or not (a and b):
if JS_Undefined in (a, b) or not (a or b):
return float('nan')
return (a or 0) / b if b else float('inf')