Skip to main content
1 of 3

It seems that the problem is not related to your solidity code, but the transaction's setup(gas/gas limit). Let me know if this helps you.