diff options
Diffstat (limited to 'lib/abi.js')
-rw-r--r-- | lib/abi.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/abi.js b/lib/abi.js index 0989f4e15..ba47dca73 100644 --- a/lib/abi.js +++ b/lib/abi.js @@ -211,6 +211,7 @@ var signedIsNegative = function (value) { /// Formats input right-aligned input bytes to int /// @returns right-aligned input bytes formatted to int var formatOutputInt = function (value) { + value = value || "0"; // check if it's negative number // it it is, return two's complement if (signedIsNegative(value)) { @@ -222,6 +223,7 @@ var formatOutputInt = function (value) { /// Formats big right-aligned input bytes to uint /// @returns right-aligned input bytes formatted to uint var formatOutputUInt = function (value) { + value = value || "0"; return new BigNumber(value, 16); }; |