From 47fc6d38ef26fc57beae32c110ccaf75ac8c19fa Mon Sep 17 00:00:00 2001 From: Luke Hubmayer-Werner Date: Wed, 6 Dec 2023 17:48:30 +1030 Subject: [PATCH] Fix StreamPeer::get_data(size)[0] typoes --- scripts/loaders/SoundLoader.gd | 2 +- scripts/loaders/StringLoader.gd | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/loaders/SoundLoader.gd b/scripts/loaders/SoundLoader.gd index a42148b..874a802 100644 --- a/scripts/loaders/SoundLoader.gd +++ b/scripts/loaders/SoundLoader.gd @@ -176,7 +176,7 @@ func get_song_data(buffer: StreamPeerBuffer, id: int): var tracks = [] for i in range(1, track_ptrs.size()-1): var length = track_ptrs[i+1] - track_ptrs[i] - tracks.append(buffer.get_data(length)[0]) + tracks.append(buffer.get_data(length)[1]) return tracks func load_bgms(buffer: StreamPeerBuffer): diff --git a/scripts/loaders/StringLoader.gd b/scripts/loaders/StringLoader.gd index 9d9e928..8ff9efc 100644 --- a/scripts/loaders/StringLoader.gd +++ b/scripts/loaders/StringLoader.gd @@ -73,14 +73,14 @@ func load_snes_rom(buffer: StreamPeerBuffer, is_RPGe: bool = false) -> void: buffer.seek(ptrs[i]) var size: int = ptrs[i+1] - ptrs[i] if size > 0: - raw_strings.append(buffer.get_data(size)[0]) + raw_strings.append(buffer.get_data(size)[1]) else: print_debug('String pointer mismatch: "%s" index %d: 0x%06X:0x%06X, effective size of %d bytes' % [block_name, i, ptrs[i], ptrs[i+1], size]) raw_strings.append(PoolByteArray()) else: # Get first level of data for i in num_entries: - raw_strings.append(buffer.get_data(l1_width)[0]) + raw_strings.append(buffer.get_data(l1_width)[1]) # Decode if block.dialog: