Browse Source

bug fixed at setting segments

master
Michael Preisach 7 years ago
parent
commit
1257327f35
  1. 6
      src/protocol.rs

6
src/protocol.rs

@ -63,7 +63,7 @@ impl Protocol {
let arguments:Vec<&str> = input.split_whitespace().collect();
if arguments.len() < 1 {
self.running = false;
return Err("ERR Nmissing arguments");
return Err("ERR Missing arguments");
}
match arguments[0] {
"setsegment" => {
@ -74,9 +74,9 @@ impl Protocol {
let index = match arguments[1].parse::<usize>() {
Ok(value) => {
if value < 8 {
return Err("ERR index out of bounds");
} else {
value
} else {
return Err("ERR index out of bounds");
}
},
Err(_e) => return Err("ERR index not a number")

Loading…
Cancel
Save