Skip to content

Commit

Permalink
Use stride in DataBufferBuilder.set
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNeuralBit committed Jun 26, 2019
1 parent 0568544 commit 2e4ce7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/src/builder/buffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export class DataBufferBuilder<T extends TypedArray> extends BufferBuilder<T, nu
public get(index: number) { return this.buffer[index]; }
public set(index: number, value: number) {
this.reserve(index - this.length + 1);
this.buffer[index] = value;
this.buffer[index * this.stride] = value;
return this;
}
}
Expand Down

0 comments on commit 2e4ce7a

Please sign in to comment.