mirror of
https://github.com/open-goal/jak-project
synced 2026-08-14 12:34:36 -04:00
[jak 2] merc (#2039)
This commit is contained in:
@@ -156,7 +156,7 @@ goos::Object decompile_at_label_guess_type(const DecompilerLabel& label,
|
||||
GameVersion version) {
|
||||
auto guessed_type = get_type_of_label(label, words);
|
||||
if (!guessed_type.has_value()) {
|
||||
throw std::runtime_error("Could not guess the type of " + label.name);
|
||||
throw std::runtime_error("(1) Could not guess the type of " + label.name);
|
||||
}
|
||||
return decompile_at_label(*guessed_type, label, labels, words, ts, file, version);
|
||||
}
|
||||
@@ -1567,7 +1567,14 @@ goos::Object decompile_pair_elt(const LinkedWord& word,
|
||||
auto& label = labels.at(word.label_id());
|
||||
auto guessed_type = get_type_of_label(label, words);
|
||||
if (!guessed_type.has_value()) {
|
||||
throw std::runtime_error("Could not guess the type of " + label.name);
|
||||
auto& info = file->label_db->lookup(label.name);
|
||||
if (info.known) {
|
||||
guessed_type = info.result_type;
|
||||
}
|
||||
}
|
||||
|
||||
if (!guessed_type.has_value()) {
|
||||
throw std::runtime_error("(1) Could not guess the type of " + label.name);
|
||||
}
|
||||
|
||||
if (guessed_type == TypeSpec("pair")) {
|
||||
|
||||
Reference in New Issue
Block a user