Fix off-by-one error in show-immediate parsing
This commit is contained in:
parent
b62968379a
commit
37c77d93d7
@ -48,14 +48,14 @@ impl DirectiveAction {
|
||||
},
|
||||
ShowImmediate => {
|
||||
let cur_state = repl.get_cur_language_state();
|
||||
let stage_name = match arguments.get(1) {
|
||||
let stage_name = match arguments.get(0) {
|
||||
Some(s) => s.to_string(),
|
||||
None => return Some(format!("Must specify a thing to debug")),
|
||||
};
|
||||
let meta = LangMetaRequest::ImmediateDebug(DebugAsk::ByStage { stage_name: stage_name.clone(), token: None });
|
||||
let meta_response = cur_state.request_meta(meta);
|
||||
|
||||
let response = match meta_response {
|
||||
let response = match meta_response {
|
||||
LangMetaResponse::ImmediateDebug(DebugResponse { ask, value }) => match ask {
|
||||
DebugAsk::ByStage { stage_name: ref this_stage_name, ..} if *this_stage_name == stage_name => value,
|
||||
_ => return Some(format!("Wrong debug stage"))
|
||||
|
Loading…
Reference in New Issue
Block a user