diff --git a/echo/echo.rs b/echo/echo.rs index aa815ec35..1ba00d0a1 100644 --- a/echo/echo.rs +++ b/echo/echo.rs @@ -96,7 +96,7 @@ fn parse_options(args: Vec, options: &mut EchoOptions) -> Option options.escape = true, "-E" => options.escape = false, _ => { - if arg.as_slice().char_at(0) == '-' && arg.len() > 1 { + if arg.len() > 1 && arg.as_slice().char_at(0) == '-' { let mut newopts = options.clone(); let argptr: *String = &arg; // escape from the borrow checker for ch in unsafe { (*argptr).as_slice() }.chars().skip(1) {