Skip to content

Commit

Permalink
zero
Browse files Browse the repository at this point in the history
Signed-off-by: Danno Ferrin <[email protected]>
  • Loading branch information
shemnon committed Oct 5, 2023
1 parent 5b3f18a commit e3caf35
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ public long modExpGasCost(final Bytes input) {
multiplicationComplexity =
Words.clampedMultiply(multiplicationComplexity, multiplicationComplexity);

if (multiplicationComplexity > 0) {
if (multiplicationComplexity == 0) {
return 200;
} else if (multiplicationComplexity > 0) {
long maxExponentLength = Long.MAX_VALUE / multiplicationComplexity * 3 / 8;
if (exponentLength > maxExponentLength) {
return Long.MAX_VALUE;
Expand Down

0 comments on commit e3caf35

Please sign in to comment.