Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/edit_assembly #88

Merged
merged 2 commits into from
Jul 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/app/asm/assembly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ impl App {

loop {
if current_byte >= maximum_code_byte {
to_byte = maximum_code_byte;
break;
}
let bytes = &self.data.bytes[current_byte..maximum_code_byte];
Expand Down Expand Up @@ -362,7 +363,7 @@ impl App {
return;
}

let to_instruction = self.assembly_offsets[to_byte];
let to_instruction = self.assembly_offsets.get(to_byte).cloned().unwrap_or(self.assembly_instructions.len());

let mut original_instruction_count = 1;
let mut original_instruction_ip = self.assembly_offsets[from_byte];
Expand Down Expand Up @@ -395,6 +396,10 @@ impl App {
),
);
}
else
{
break;
}
}
for instruction in instructions.iter() {
if let AssemblyLine::Instruction(instruction_tag) = instruction {
Expand Down
Loading