[FEAT] Decompiler

[BUG] Several address calculation errors
This commit is contained in:
2021-05-05 09:34:58 +02:00
parent 1516043f17
commit 37fdf1f42f
6 changed files with 80 additions and 4 deletions

View File

@@ -65,7 +65,7 @@ const int scope_declare_variable(const std::string name, const uint32_t type, co
const uint32_t address = scope.total_size;
const t_variable var {name, type, length, address};
scope.variables.push_back(var);
scope.total_size += types_get_length(type) + (length == 0 ? 1 : length);
scope.total_size += types_get_length(type) * (length == 0 ? 1 : length);
return address;
}