This commit is contained in:
Marek Kotewicz
2015-01-27 15:20:22 +01:00
parent 42a25f2f26
commit 09f633596d
6 changed files with 46 additions and 6 deletions

View File

@ -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);
};