You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
unsafeDecimalStringToSignedInt @return doc describes a 0/1 boolean that does not exist #40
The doc reads: "Whether the conversion was successful. If 0, this is due to an overflow, if 1 the conversion was successful." The first return value is actually a bytes4 error selector where 0 MEANS success, a nonzero value is one of ParseEmptyDecimalString.selector / ParseDecimalOverflow.selector (not only overflow), and 1 is never returned. Every clause of the sentence is wrong for the implementation.
The unsigned sibling (lines 19-21) documents the selector correctly and carries an "ALWAYS check the error selector before using the value" warning that the signed function lacks — the signed function is the one where an unchecked value is a plausible signed number (see companion issue on overflow-path return values).
Activity
Trim the signed @return doc to the issue's scope