Skip to content

[Implement] Buffer.writeInt8#13

Merged
jtenner merged 2 commits intoAssemblyScript:masterfrom
RedDwarfian:buffe-writeint8
Jul 21, 2019
Merged

[Implement] Buffer.writeInt8#13
jtenner merged 2 commits intoAssemblyScript:masterfrom
RedDwarfian:buffe-writeint8

Conversation

@RedDwarfian
Copy link
Copy Markdown
Contributor

No description provided.

@jtenner jtenner added the enhancement New feature or request label Jul 21, 2019
Copy link
Copy Markdown
Contributor

@jtenner jtenner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@jtenner jtenner merged commit 8613b14 into AssemblyScript:master Jul 21, 2019
}

writeInt8(value: i8, offset: i32 = 0): i32 {
if(<u32>offset > this.dataLength) throw new RangeError(E_INDEXOUTOFRANGE);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be offset >= this.dataLength?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how I missed that. Thanks for the heads up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants