Skip to content

Commit

Permalink
Fixed DateView length issue
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed Dec 10, 2024
1 parent 1aafc0e commit 80ae7c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions eslint.shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ export default function (tsconfigRootDir) {
'@typescript-eslint/consistent-type-imports': 'warn',
'@typescript-eslint/no-unnecessary-type-assertion': 'warn',
'@typescript-eslint/require-await': 'warn',
'@typescript-eslint/no-unsafe-return': 'warn',
'@typescript-eslint/no-unsafe-assignment': 'warn',
'@typescript-eslint/no-unsafe-member-access': 'warn',
'@typescript-eslint/no-unsafe-argument': 'warn',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-redundant-type-constituents': 'warn',
'@typescript-eslint/no-unsafe-call': 'warn',
'@typescript-eslint/restrict-plus-operands': 'off',
Expand Down
2 changes: 1 addition & 1 deletion src/struct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export function deserialize(instance: unknown, _buffer: ArrayBufferLike | ArrayB

const buffer = _buffer instanceof Uint8Array ? _buffer : new Uint8Array('buffer' in _buffer ? _buffer.buffer : _buffer);

const view = new DataView(buffer.buffer, buffer.byteOffset, buffer.byteOffset + buffer.byteLength);
const view = new DataView(buffer.buffer, buffer.byteOffset, buffer.byteLength);

for (const [name, { type, offset, length }] of members) {
for (let i = 0; i < (length || 1); i++) {
Expand Down

0 comments on commit 80ae7c4

Please sign in to comment.