-
-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - Fix casting negative number to usize in Array.splice
#2030
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2030 +/- ##
==========================================
- Coverage 44.15% 44.14% -0.01%
==========================================
Files 210 210
Lines 18596 18594 -2
==========================================
- Hits 8211 8209 -2
Misses 10385 10385
Continue to review full report at Codecov.
|
VM implementation
Fixed tests (18):
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
bors r+ |
This Pull Request fixes a faulty cast for `Array.splice`. Negative values for delete_count were being directly casted to usize, which was not the intended behavior. This pull request fixes the issue by using a fallible conversion, defaulting to 0 if the conversion fails. It changes the following: - Replace cast in `Array.splice` prototype method with fallible conversion.
Pull request successfully merged into main. Build succeeded: |
Array.splice
Array.splice
This Pull Request fixes a faulty cast for `Array.splice`. Negative values for delete_count were being directly casted to usize, which was not the intended behavior. This pull request fixes the issue by using a fallible conversion, defaulting to 0 if the conversion fails. It changes the following: - Replace cast in `Array.splice` prototype method with fallible conversion.
This Pull Request fixes a faulty cast for
Array.splice
.Negative values for delete_count were being directly casted to usize, which was not the intended behavior. This pull request fixes the issue by using a fallible conversion, defaulting to 0 if the conversion fails.
It changes the following:
Array.splice
prototype method with fallible conversion.