File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
lib/node_modules/@stdlib/dstructs/struct/lib Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -187,13 +187,13 @@ function factory( fields ) {
187
187
}
188
188
if ( isArrayBuffer ( arg ) ) {
189
189
if ( nargs === 1 ) {
190
- view = new DataView ( arg ) ;
190
+ view = new DataView ( arg , 0 , BYTE_LENGTH ) ;
191
191
} else {
192
192
if ( ! isNonNegativeInteger ( byteOffset ) ) {
193
193
throw new TypeError ( format ( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.' , byteOffset ) ) ;
194
194
}
195
195
if ( nargs === 2 ) {
196
- view = new DataView ( arg , byteOffset ) ;
196
+ view = new DataView ( arg , byteOffset , BYTE_LENGTH ) ;
197
197
} else {
198
198
if ( ! isNonNegativeInteger ( byteLength ) ) {
199
199
throw new TypeError ( format ( 'invalid argument. Byte length must be a nonnegative integer. Value: `%s`.' , byteLength ) ) ;
You can’t perform that action at this time.
0 commit comments