mulDiv returns 0 if numerator is 0 and denominator isn't:

* Otherwise overflow checks result in divide by 0.
* If denominator is 0, let the divide by 0 exception throw.
* Move mulDiv out of STAmount
This commit is contained in:
Edward Hennis
2015-11-10 20:48:43 -05:00
committed by seelabs
parent 2c9c3f4b6e
commit e78b8e4cf3
11 changed files with 266 additions and 81 deletions

View File

@@ -25,6 +25,7 @@
#include <ripple/app/paths/Pathfinder.h>
#include <ripple/app/tx/apply.h> // Validity::Valid
#include <ripple/basics/Log.h>
#include <ripple/basics/mulDiv.h>
#include <ripple/core/LoadFeeTrack.h>
#include <ripple/json/json_writer.h>
#include <ripple/net/RPCErr.h>