We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
OOG Error when trying to assign 0 to a struct value.
I do not know why the reset() function in the code below returns an OOG (Out Of Gas) error when being called after the start() function is called.
reset()
start()
The value of the structs's val variable cannot be changed to 0, but is 0 on initialization.
val
Can this be fixed?
// SPDX-License-Identifier: MIT pragma solidity >0.6.0; contract A { struct f { string name; uint val; } mapping(uint => f) private j; function start() public { j[1].val = 8; } function see() public view returns(uint) { return j[1].val; } function reset() public { j[1].val = 0; // OOG Error here. } }
The text was updated successfully, but these errors were encountered:
Hello @fps8k , Can you check it now? It should be fixed
Sorry, something went wrong.
No branches or pull requests
Description
OOG Error when trying to assign 0 to a struct value.
Environment
Out of Gas Error.
I do not know why the
reset()
function in the code below returns an OOG (Out Of Gas) error when being called after thestart()
function is called.The value of the structs's
val
variable cannot be changed to 0, but is 0 on initialization.Can this be fixed?
The text was updated successfully, but these errors were encountered: