Skip to content

Commit

Permalink
Fix parsing string constants that start with 0x (#958)
Browse files Browse the repository at this point in the history
  • Loading branch information
arcz authored Mar 6, 2023
1 parent 16db7e5 commit fef5dae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Echidna/Processor.hs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ instance FromJSON SlitherInfo where
"string" ->
pure . Just . AbiString $
if "0x" `isPrefixOf` v
then fromRight (error ("invalid b16 decoding of: " ++ show v)) $ BS16.decode $ BSU.fromString $ drop 2 v
then fromRight (BSU.fromString v) $ BS16.decode $ BSU.fromString $ drop 2 v
else BSU.fromString v

"address" -> pure $ AbiAddress . Addr <$> readMaybe v
Expand Down

0 comments on commit fef5dae

Please sign in to comment.