Browse Source

Avoid divide by zero.

cl-refactor
Gav Wood 10 years ago
parent
commit
1f9330a29c
  1. 2
      alethzero/Transact.cpp

2
alethzero/Transact.cpp

@ -360,7 +360,7 @@ void Transact::rejigData()
return;
}
else
gasNeeded = (qint64)min<bigint>(ethereum()->gasLimitRemaining(), ((b - value()) / gasPrice()));
gasNeeded = (qint64)min<bigint>(ethereum()->gasLimitRemaining(), ((b - value()) / max<u256>(gasPrice(), 1)));
// Dry-run execution to determine gas requirement and any execution errors
Address to;

Loading…
Cancel
Save