Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
Normative: Don't consider 0-length TypedArrays out of bounds (#70)
Browse files Browse the repository at this point in the history
Closes #68
  • Loading branch information
syg authored Aug 18, 2021
1 parent 6d5ad44 commit 8fbb531
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,8 @@ <h1>IsIntegerIndexedObjectOutOfBounds ( _O_, _getBufferByteLength_ )</h1>
1. Else,
1. Let _elementSize_ be the Element Size value specified in <emu-xref href="#table-the-typedarray-constructors"></emu-xref> for _O_.[[TypedArrayName]].
1. Let _byteOffsetEnd_ be _byteOffsetStart_ + _O_.[[ArrayLength]] &times; _elementSize_.
1. If _byteOffsetStart_ &ge; _bufferByteLength_ or _byteOffsetEnd_ &gt; _bufferByteLength_, then return *true*.
1. If _byteOffsetStart_ &gt; _bufferByteLength_ or _byteOffsetEnd_ &gt; _bufferByteLength_, then return *true*.
1. NOTE: 0-length TypedArrays are not considered out-of-bounds.
1. Return *false*.
</emu-alg>
</emu-clause>
Expand Down

0 comments on commit 8fbb531

Please sign in to comment.