for_each_*_object: move declarations to object-store.h
[gitweb.git] / line-range.c
index 323399d16cfa828adce913c9ff994e860ce2e7a5..232c3909ec27d3079e9228d0fcf561ce6a349754 100644 (file)
@@ -47,7 +47,7 @@ static const char *parse_loc(const char *spec, nth_line_fn_t nth_line,
                        else if (!num)
                                *ret = begin;
                        else
-                               *ret = begin + num;
+                               *ret = begin + num > 0 ? begin + num : 1;
                        return term;
                }
                return spec;