Skip to content

Commit 7fd684f

Browse files
authored
Backport fix for GHSA-f886-m6hf-6m8v (#95)
1 parent 44f33b4 commit 7fd684f

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ function expand(str, isTop) {
151151
var y = numeric(n[1]);
152152
var width = Math.max(n[0].length, n[1].length)
153153
var incr = n.length == 3
154-
? Math.abs(numeric(n[2]))
154+
? Math.max(Math.abs(numeric(n[2])), 1)
155155
: 1;
156156
var test = lte;
157157
var reverse = y < x;
@@ -198,4 +198,3 @@ function expand(str, isTop) {
198198

199199
return expansions;
200200
}
201-

test/bash-results.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1081,4 +1081,6 @@ A{b,{d,e},{f,g}}Z
10811081
[a}b]><><><><{}{{},a}}b
10821082
[{}{}}b]
10831083
[{}a}b]><><><><{}a,b}c
1084-
[{}a,b}c]><><><><
1084+
[{}a,b}c]><><><><{1..2..0}
1085+
[1]
1086+
[2]><><><><

test/cases.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,3 +185,4 @@ y{},a}x
185185
{{},a}}b
186186
{}{{},a}}b
187187
{}a,b}c
188+
{1..2..0}

0 commit comments

Comments
 (0)