Open erak opened 5 years ago
Is this only an issue with error strings or with strings in general?
This applies to all strings (error strings aren't handled differently):
contract C {
function s() public pure returns (string memory) {
return "A string that is longer than 32 bytes.";
}
}
// ----
// s() -> 0x20, 38, "A string that is longer than 32 bytes."
Which leads to an exception since the expected value can not be encoded.
Leaving the expected values empty in order to let the auto-update routine fill them in, results in a broken value:
// s() -> 0x20, 38, "A string that is longer than 32 "
I think this is solved now
Aren't those strings still split into 32-byte chunks, e.g. "A string..", "is long...".
Aren't those strings still split into 32-byte chunks, e.g. "A string..", "is long...".
Yes, they are. But I was thinking back than it wasn't working, so maybe issue is not worth fixing.
The following test
does not handle strings longer than 32 bytes correctly: