Fixed function ends being at the wrong place.

This commit is contained in:
2020-10-28 22:37:12 +00:00
parent 7d380510da
commit 15bee575f8
2 changed files with 3 additions and 1 deletions

View File

@@ -86,6 +86,7 @@ impl Func<&'static str> {
Pos(0x80056284) => "^",
Pos(0x80056288) => "^",
Pos(0x8005628c) => "^",
Pos(0x800562a8) => "Initialize stack to (*StackStart - 0x10) | 0x80000000",
Pos(0x800562f8) => "args: (0x8007f988, ???)",
Pos(0x8005630c) => "args: (0x8007f98c)",
Pos(0x80056324) => "args: (string_0, string_0)",

View File

@@ -140,7 +140,8 @@ impl Funcs<String> {
.iter()
.zip(0..)
.map(|(&target, idx)| {
let end_pos = returns.range(target..).next().copied().unwrap_or(target);
// Note: +8 for return + instruction after.
let end_pos = returns.range(target..).next().copied().unwrap_or(target) + 8;
let labels = labels
.range(target..end_pos)
.zip(0..)