Fix disassembly wrong name for main
This commit is contained in:
@@ -353,10 +353,14 @@ impl Disassembler {
|
||||
}
|
||||
|
||||
fn disasm_method(&mut self, i: i32, pc: usize, args: usize, vars: usize) -> Result<Method> {
|
||||
let name = self
|
||||
.symbols
|
||||
.lookup_method(pc)
|
||||
.unwrap_or_else(|| format!("func_{}", i));
|
||||
|
||||
let name = if pc == 0 {
|
||||
"main".to_string()
|
||||
} else {
|
||||
self.symbols
|
||||
.lookup_method(pc)
|
||||
.unwrap_or_else(|| format!("func_{}", i))
|
||||
};
|
||||
let mut method = Method::new(name, pc, args, vars);
|
||||
|
||||
while self.text.has_i8() && !self.is_method(self.text.cur()) {
|
||||
|
||||
Reference in New Issue
Block a user