Skip to content

Conversation

kripken
Copy link
Member

@kripken kripken commented Mar 14, 2024

No description provided.

@kripken kripken requested a review from tlively March 14, 2024 23:34
Literals contents;
if (endVal > startVal) {
contents.reserve(endVal - startVal);
for (size_t i = startVal; i < endVal; i++) {
Copy link
Member

Choose a reason for hiding this comment

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

We need to check that the string is ascii up to endVal before we execute the slice.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, fixed.

Copy link
Member

@tlively tlively left a comment

Choose a reason for hiding this comment

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

LGTM!

@kripken kripken merged commit 70f860e into WebAssembly:main Mar 19, 2024
@kripken kripken deleted the string.slice branch March 19, 2024 19:30
@gkdn gkdn mentioned this pull request Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants