summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2017-10-15 03:30:52 -0700
committeriximeow <me@iximeow.net>2017-10-15 03:30:52 -0700
commit582351d837cb25680a3d7ae7345cf82479a3adf8 (patch)
treea8faf20d15537c42d2f941da20e0f06307842360
parentc6db91eddda42687a24859373869bef5df997cc0 (diff)
fix bug in address dialog not going away immediately
-rw-r--r--main.rs34
1 files changed, 17 insertions, 17 deletions
diff --git a/main.rs b/main.rs
index e47efda..9792daf 100644
--- a/main.rs
+++ b/main.rs
@@ -531,27 +531,27 @@ fn interface_loop(state: &mut Program) {
state.input_buf = Vec::with_capacity(0);
state.state = Mode::Edit;
state.status = " ".to_string();
- continue;
- }
- let addr_str = u64::from_str_radix(&buf_str, 16);
- match addr_str {
- Ok(addr) => {
- if addr < state.view.size() {
- state.seek_to(addr);
- state.input_buf = Vec::with_capacity(0);
- state.state = Mode::Edit;
- state.status = " ".to_string();
- } else {
- state.status = format!("Address out of bounds: 0x{:x}", addr);
+ } else {
+ let addr_str = u64::from_str_radix(&buf_str, 16);
+ match addr_str {
+ Ok(addr) => {
+ if addr < state.view.size() {
+ state.seek_to(addr);
+ state.input_buf = Vec::with_capacity(0);
+ state.state = Mode::Edit;
+ state.status = " ".to_string();
+ } else {
+ state.status = format!("Address out of bounds: 0x{:x}", addr);
+ state.input_buf = Vec::with_capacity(0);
+ state.state = Mode::Edit;
+ }
+ }
+ Err(s) => {
+ state.status = format!("Unable to parse address '{}', error: {}", buf_str, s);
state.input_buf = Vec::with_capacity(0);
state.state = Mode::Edit;
}
}
- Err(s) => {
- state.status = format!("Unable to parse address '{}', error: {}", buf_str, s);
- state.input_buf = Vec::with_capacity(0);
- state.state = Mode::Edit;
- }
}
}
Event::Key(Key::Esc) => {