Skip to content

Commit

Permalink
core: fix possibly negative string length
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBB committed Jun 13, 2016
1 parent 8368be3 commit dfad604
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions core/core-spacemacs-buffer.el
Original file line number Diff line number Diff line change
Expand Up @@ -493,10 +493,11 @@ border."
(setq spacemacs-loading-counter 0)
(setq spacemacs-loading-string
(make-string
(- (* spacemacs-loading-dots-chunk-size
(floor (/ spacemacs-loading-value
spacemacs-loading-dots-chunk-threshold)))
(length suffix))
(max 0
(- (* spacemacs-loading-dots-chunk-size
(floor (/ spacemacs-loading-value
spacemacs-loading-dots-chunk-threshold)))
(length suffix)))
spacemacs-loading-char))
(spacemacs-buffer/set-mode-line (concat spacemacs-loading-string
suffix)))
Expand Down

1 comment on commit dfad604

@syl20bnr
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

Please sign in to comment.