diff --git a/src/seq/seq.rs b/src/seq/seq.rs index 52609657f..b7986c31b 100644 --- a/src/seq/seq.rs +++ b/src/seq/seq.rs @@ -22,7 +22,10 @@ struct SeqOptions { widths: bool } -fn parse_float(s: &str) -> Result{ +fn parse_float(mut s: &str) -> Result { + if s.starts_with("+") { + s = s.slice_from(1); + } match from_str(s) { Some(n) => Ok(n), None => Err(format!("seq: invalid floating point argument: {}", s)) @@ -179,7 +182,7 @@ pub fn uumain(args: Vec) -> int { let dec = slice.find('.').unwrap_or(len); largest_dec = cmp::max(largest_dec, len - dec); padding = cmp::max(padding, dec); - match parse_float(free[1].as_slice()) { + match parse_float(slice) { Ok(n) => n, Err(s) => { show_error!("{}", s); return 1; } }