Skip to content

Commit

Permalink
add 1e6 upper bound to pos array length
Browse files Browse the repository at this point in the history
  • Loading branch information
etpinard committed Jul 19, 2017
1 parent b824d8e commit eef9158
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/traces/histogram/calc.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ module.exports = function calc(gd, trace) {
// decrease end a little in case of rounding errors
binend = pr2c(binspec.end) + (i - Axes.tickIncrement(i, binspec.size, false, calendar)) / 1e6;

while(i < binend) {
while(i < binend && pos.length < 1e6) {
i2 = Axes.tickIncrement(i, binspec.size, false, calendar);
pos.push((i + i2) / 2);
size.push(sizeinit);
Expand Down

0 comments on commit eef9158

Please sign in to comment.