Skip to content

Commit 0a78e03

Browse files
authored
[Fix] restore node < 4 compat
Fixes #314.
1 parent 43ac7f2 commit 0a78e03

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/elliptic/utils.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ utils.encode = minUtils.encode;
1414
// Represent num in a w-NAF form
1515
function getNAF(num, w, bits) {
1616
var naf = new Array(Math.max(num.bitLength(), bits) + 1);
17-
naf.fill(0);
17+
for (var i = 0; i < naf.length; i += 1) {
18+
naf[i] = 0;
19+
}
1820

1921
var ws = 1 << (w + 1);
2022
var k = num.clone();

0 commit comments

Comments
 (0)