Closed burgerrg closed 5 months ago
Thanks for tracking that down! In the borken checks, I was trying to use the $fxu<
trick used in other functions to guard against both a too-large value and a negative value in one step — but that doesn't work for a larger range (word-sized, in this case) that needs to be in bounds on both ends.
The unsigned check
($fxu< (fx- (bytevector-length bv) (fx- (constant ptr-bytes) 1)) i)
doesn't work as designed when the first argument goes negative.