Skip to content

Commit 311ac0d

Browse files
authored
Backport fix for GHSA-f886-m6hf-6m8v to v2 (#96)
1 parent a3efcee commit 311ac0d

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ function expand(str, isTop) {
148148
var y = numeric(n[1]);
149149
var width = Math.max(n[0].length, n[1].length)
150150
var incr = n.length == 3
151-
? Math.abs(numeric(n[2]))
151+
? Math.max(Math.abs(numeric(n[2])), 1)
152152
: 1;
153153
var test = lte;
154154
var reverse = y < x;
@@ -200,4 +200,3 @@ function expand(str, isTop) {
200200

201201
return expansions;
202202
}
203-

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)