Merge pull request #398 from gabrielmcoelho/patch-1

Remove out-of-bounds index comparison
This commit is contained in:
Jean-Baptiste Onofré 2019-10-18 19:07:03 +02:00 committed by GitHub
commit 17c417e808
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -454,7 +454,7 @@ PlotKit.Layout.prototype._evaluateLineTicksForXAxis = function() {
var tickCount = 0;
this.xticks = new Array();
for (var i = 0; i <= xvalues.length; i++) {
for (var i = 0; i < xvalues.length; i++) {
if (xvalues[i] >= (tickCount) * roughSeparation) {
var pos = this.xscale * (xvalues[i] - this.minxval);
if ((pos > 1.0) || (pos < 0.0))