From ca5fecef31626e5345c84d95db380bff7745ad15 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Tue, 30 Jun 2015 00:36:42 +0300 Subject: [PATCH] fixed store int as long --- app/js/lib/tl_utils.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/js/lib/tl_utils.js b/app/js/lib/tl_utils.js index a94547e2..56093efc 100644 --- a/app/js/lib/tl_utils.js +++ b/app/js/lib/tl_utils.js @@ -102,6 +102,9 @@ TLSerialization.prototype.storeLong = function (sLong, field) { } } + if (typeof sLong != 'string') { + sLong = sLong ? sLong.toString() : '0'; + } var divRem = bigStringInt(sLong).divideAndRemainder(bigint(0x100000000)); this.writeInt(intToUint(divRem[1].intValue()), (field || '') + ':long[low]');