diff options
author | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-01-27 22:20:22 +0800 |
---|---|---|
committer | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-01-27 22:20:22 +0800 |
commit | 09f633596da91818201781cc009e1e1ab6f8d059 (patch) | |
tree | ffbbd41d94f8fca0d2139cf745141073549f0921 /lib/abi.js | |
parent | 42a25f2f26f14a0b0ecfca31b5000f7a1d50240a (diff) | |
download | dexon-09f633596da91818201781cc009e1e1ab6f8d059.tar dexon-09f633596da91818201781cc009e1e1ab6f8d059.tar.gz dexon-09f633596da91818201781cc009e1e1ab6f8d059.tar.bz2 dexon-09f633596da91818201781cc009e1e1ab6f8d059.tar.lz dexon-09f633596da91818201781cc009e1e1ab6f8d059.tar.xz dexon-09f633596da91818201781cc009e1e1ab6f8d059.tar.zst dexon-09f633596da91818201781cc009e1e1ab6f8d059.zip |
fixed #23
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); }; |