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> {
|
fn disasm_method(&mut self, i: i32, pc: usize, args: usize, vars: usize) -> Result<Method> {
|
||||||
let name = self
|
|
||||||
.symbols
|
let name = if pc == 0 {
|
||||||
.lookup_method(pc)
|
"main".to_string()
|
||||||
.unwrap_or_else(|| format!("func_{}", i));
|
} else {
|
||||||
|
self.symbols
|
||||||
|
.lookup_method(pc)
|
||||||
|
.unwrap_or_else(|| format!("func_{}", i))
|
||||||
|
};
|
||||||
let mut method = Method::new(name, pc, args, vars);
|
let mut method = Method::new(name, pc, args, vars);
|
||||||
|
|
||||||
while self.text.has_i8() && !self.is_method(self.text.cur()) {
|
while self.text.has_i8() && !self.is_method(self.text.cur()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user