mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
SM: Fix FakeROM instances sharing the same data dictionary (#4912)
FakeROM instances were being created with default arguments, which included a mutable default argument data dictionary, so all FakeROM instances would be writing to and reading the same dictionary, resulting in broken patch data in multiworlds with more than one Super Metroid world.
This commit is contained in:
@@ -89,9 +89,12 @@ class ROM(object):
|
||||
|
||||
class FakeROM(ROM):
|
||||
# to have the same code for real ROM and the webservice
|
||||
def __init__(self, data={}):
|
||||
def __init__(self, data=None):
|
||||
super(FakeROM, self).__init__()
|
||||
self.data = data
|
||||
if data is None:
|
||||
self.data = {}
|
||||
else:
|
||||
self.data = data
|
||||
self.ipsPatches = []
|
||||
|
||||
def write(self, bytes):
|
||||
|
Reference in New Issue
Block a user