Skip to content

Commit

Permalink
Fix working array overflow. (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisLoer authored Feb 8, 2021
1 parent 67de39b commit 5f64848
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ function TinySDF(fontSize, buffer, radius, cutoff, fontFamily, fontWeight) {
// temporary arrays for the distance transform
this.gridOuter = new Float64Array(gridSize * gridSize);
this.gridInner = new Float64Array(gridSize * gridSize);
this.f = new Float64Array(size);
this.z = new Float64Array(size + 1);
this.v = new Uint16Array(size);
this.f = new Float64Array(gridSize);
this.z = new Float64Array(gridSize + 1);
this.v = new Uint16Array(gridSize);

// hack around https://bugzilla.mozilla.org/show_bug.cgi?id=737852
this.middle = Math.round((size / 2) * (navigator.userAgent.indexOf('Gecko/') >= 0 ? 1.2 : 1));
Expand Down

0 comments on commit 5f64848

Please sign in to comment.