mirror of
https://github.com/open-goal/jak-project
synced 2026-05-27 16:14:18 -04:00
[decompiler/compiler] Fixes for task-control (#668)
* fix decompiler for task control * support in compiler * changelog * typo
This commit is contained in:
@@ -104,7 +104,11 @@ Function& LinkedObjectFile::get_function_at_label(int label_id) {
|
||||
* Get the function starting at this label, or nullptr if there is none.
|
||||
*/
|
||||
const Function* LinkedObjectFile::try_get_function_at_label(int label_id) const {
|
||||
auto& label = labels.at(label_id);
|
||||
const auto& label = labels.at(label_id);
|
||||
return try_get_function_at_label(label);
|
||||
}
|
||||
|
||||
const Function* LinkedObjectFile::try_get_function_at_label(const DecompilerLabel& label) const {
|
||||
for (auto& func : functions_by_seg.at(label.target_segment)) {
|
||||
// + 4 to skip past type tag to the first word, which is were the label points.
|
||||
if (func.start_word * 4 + 4 == label.offset) {
|
||||
|
||||
Reference in New Issue
Block a user