fix: Fixed incorrect usage of toI32() for i64 conversion#1984
Merged
YaroShkvorets merged 1 commit intographprotocol:mainfrom Mar 12, 2025
mdqst:patch-1
Merged
fix: Fixed incorrect usage of toI32() for i64 conversion#1984YaroShkvorets merged 1 commit intographprotocol:mainfrom mdqst:patch-1
toI32() for i64 conversion#1984YaroShkvorets merged 1 commit intographprotocol:mainfrom
mdqst:patch-1
Conversation
|
YaroShkvorets
approved these changes
Mar 12, 2025
Collaborator
YaroShkvorets
left a comment
There was a problem hiding this comment.
Thanks for PR. Wasn't really a bug because underlying value is already an i32 since it's a 32-bit WASM runtime, but I agree using toI64() is better for consistency with return value
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I’ve fixed an issue where
toI32()was being used to convert values toi64.This is incorrect, as
toI32()returns ani32, not ani64, which could result in data loss or unexpected behavior.The issue has been resolved by updating the conversion to the correct function.