diff --git a/pyrdp/player/Replay.py b/pyrdp/player/Replay.py index 2050d5362..2586fca86 100644 --- a/pyrdp/player/Replay.py +++ b/pyrdp/player/Replay.py @@ -19,6 +19,7 @@ class Replay: """ def __init__(self, file: BinaryIO): + currentMsgIndex = 0 self.events: Dict[int, List[int]] = {} self.file = file @@ -36,7 +37,9 @@ def __init__(self, file: BinaryIO): # Register PDUs as they are parsed by the layer def registerEvent(pdu: PlayerPDU): nonlocal currentMessagePosition - events[pdu.timestamp].append(currentMessagePosition) + nonlocal currentMsgIndex + events[currentMsgIndex].append(currentMessagePosition) + currentMsgIndex = currentMsgIndex + 1 # Register the offset of every event in the file. player = PlayerLayer()