From 218cd45844f9d733618af9088941156cd79b80bc Mon Sep 17 00:00:00 2001 From: Silvris <58583688+Silvris@users.noreply.github.com> Date: Fri, 22 Mar 2024 03:02:38 -0500 Subject: [PATCH] APProcedurePatch: fix RLE/COPY incorrect sizing (#3006) * change class variables to instance variables * Update worlds/Files.py Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com> * Update worlds/Files.py Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com> * move required_extensions to tuple * fix missing tuple ellipsis * fix classvar mixup * rename tokens to _tokens. use hasattr * type hint cleanup * Update Files.py * check using isinstance instead * Update Files.py --------- Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com> --- worlds/Files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/Files.py b/worlds/Files.py index 6e9bf6b31b5..69a88218efd 100644 --- a/worlds/Files.py +++ b/worlds/Files.py @@ -322,7 +322,7 @@ def get_token_binary(self) -> bytes: data.append(args) elif token_type in [APTokenTypes.COPY, APTokenTypes.RLE]: assert isinstance(args, tuple), f"Arguments to COPY/RLE must be of type tuple, not {type(args)}" - data.extend(int.to_bytes(4, 4, "little")) + data.extend(int.to_bytes(8, 4, "little")) data.extend(args[0].to_bytes(4, "little")) data.extend(args[1].to_bytes(4, "little")) elif token_type == APTokenTypes.WRITE: