diff options
Diffstat (limited to 'lisp/emacs-lisp/subr-x.el')
-rw-r--r-- | lisp/emacs-lisp/subr-x.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el index db7e75dfd2b..05fa16da499 100644 --- a/lisp/emacs-lisp/subr-x.el +++ b/lisp/emacs-lisp/subr-x.el @@ -292,7 +292,7 @@ is a positive number, return a a substring consisting of the first LENGTH characters of STRING. If LENGTH is negative, return a substring consisitng of thelast LENGTH characters of STRING." (cond - ((<= (length string) length) string) + ((<= (length string) (abs length)) string) ((>= length 0) (substring string 0 length)) (t (substring string (+ (length string) length))))) |