diff --git a/jsjaws.py b/jsjaws.py index 6a7cb576..4f6d6e6f 100755 --- a/jsjaws.py +++ b/jsjaws.py @@ -875,6 +875,8 @@ def log_and_replace(match) -> bytes: decoded_match_string = match.string.decode() except UnicodeDecodeError: return + if leading_char_index > len(decoded_match_string): + return leading_char = decoded_match_string[leading_char_index] return f"{leading_char}[{property_name}] = {property_value};".encode()