-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid an infinite loop in
wrapAnsiString
(#1864)
* Avoid an infinite loop in `wrapAnsiString` If a terminal's width is reported by node as `0`, this would get caught in an infinite loop, and crash v8 trying to allocate an ever-expanding array. This works around this by immediately returning the supplied string if the width supplied is `0`, and adds a test for such a case. fixes #1863 * Update utils-test.js
- Loading branch information
Showing
3 changed files
with
24 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters