-
Notifications
You must be signed in to change notification settings - Fork 376
Open
Description
This line should be "if(shortest - idx < 32){" otherwise we don't mask out the bits of the shortest string which aren't part of the string. Eg if we have two slices one with 33 bytes and one with 34 bytes the algorithm will compare the first 32 bytes then move on to the next 32 bytes, but shortest variable will be 33 so the current code will not mask out the last 31 bytes of this next chunk of memory.
solidity-stringutils/src/strings.sol
Line 215 in 3c63f18
if(shortest < 32) { |
Metadata
Metadata
Assignees
Labels
No labels