提交 8ac1a786 编写于 作者: D dpapastamos 提交者: Derek Parker

Fix argument length checks (#1595)

上级 dd4fd5dc
......@@ -2057,7 +2057,7 @@ func checkpoints(t *Term, ctx callContext, args string) error {
}
func clearCheckpoint(t *Term, ctx callContext, args string) error {
if len(args) < 0 {
if len(args) == 0 {
return errors.New("not enough arguments to clear-checkpoint")
}
if args[0] != 'c' {
......
......@@ -72,7 +72,7 @@ func parseLocationSpec(locStr string) (LocationSpec, error) {
case '/':
if rest[len(rest)-1] == '/' {
rx, rest := readRegex(rest[1:])
if len(rest) < 0 {
if len(rest) == 0 {
return nil, malformed("non-terminated regular expression")
}
if len(rest) > 1 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册