mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-06-28 09:28:33 +00:00
[devalue] avoid infinite loop
Authored by: bashonly
This commit is contained in:
parent
cc6111b31b
commit
363c68d3ed
@ -71,6 +71,9 @@ def parse_iter(parsed: typing.Any, /, *, revivers: dict[str, collections.abc.Cal
|
|||||||
if value and isinstance(value[0], str):
|
if value and isinstance(value[0], str):
|
||||||
# TODO: implement zips `strict=True`
|
# TODO: implement zips `strict=True`
|
||||||
if reviver := revivers.get(value[0]):
|
if reviver := revivers.get(value[0]):
|
||||||
|
if value[1] == source:
|
||||||
|
yield IndexError('custom types cannot point to themselves')
|
||||||
|
continue
|
||||||
# inverse order: resolve index, revive value
|
# inverse order: resolve index, revive value
|
||||||
stack.append((target, index, (value[0], value[1], reviver)))
|
stack.append((target, index, (value[0], value[1], reviver)))
|
||||||
stack.append((target, index, value[1]))
|
stack.append((target, index, value[1]))
|
||||||
|
Loading…
Reference in New Issue
Block a user