Closed CryptoPascal31 closed 9 months ago
When using (concat) with an empty list, a divide by 0 error is thrown here: https://github.com/kadena-io/pact/blob/9d8d0975d58fd811404130a57724bfb5a2f2af80/src/Pact/Gas/Table.hs#L270
(concat)
This bug as been introduced in Pact 4.8 by: https://github.com/kadena-io/pact/pull/1269
pact> (concat []) ""
OK
but:
pact> (env-gasmodel "table") pact> (env-gaslimit 10000) "Set gas limit to 10000" pact> (concat []) <interactive>:1:0:Error: divide by zero
And of course, the error occurs on-chain too.
Good catch, thank you @CryptoPascal31
https://github.com/kadena-io/pact/pull/1317
Issue description
When using
(concat)
with an empty list, a divide by 0 error is thrown here: https://github.com/kadena-io/pact/blob/9d8d0975d58fd811404130a57724bfb5a2f2af80/src/Pact/Gas/Table.hs#L270This bug as been introduced in Pact 4.8 by: https://github.com/kadena-io/pact/pull/1269
Steps to reproduce
OK
but:
And of course, the error occurs on-chain too.