Skip to content

Commit

Permalink
fix mtproto-utils.c:101: BN2ull: Assertion `0' failed
Browse files Browse the repository at this point in the history
  • Loading branch information
regalstreak committed Jun 21, 2017
1 parent 341a0ba commit 97098a1
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions tg/tgl/mtproto-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ static unsigned long long BN2ull (TGLC_bn *b) {
if (sizeof (unsigned long) == 8) {
return TGLC_bn_get_word (b);
} else if (sizeof (unsigned long long) == 8) {
assert (0); // As long as nobody ever uses this code, assume it is broken.
unsigned long long tmp;
/* Here be dragons, but it should be okay due to be64toh */
TGLC_bn_bn2bin (b, (unsigned char *) &tmp);
Expand All @@ -112,7 +111,6 @@ static void ull2BN (TGLC_bn *b, unsigned long long val) {
if (sizeof (unsigned long) == 8 || val < (1ll << 32)) {
TGLC_bn_set_word (b, val);
} else if (sizeof (unsigned long long) == 8) {
assert (0); // As long as nobody ever uses this code, assume it is broken.
htobe64(val);
/* Here be dragons, but it should be okay due to htobe64 */
TGLC_bn_bin2bn ((unsigned char *) &val, 8, b);
Expand Down

0 comments on commit 97098a1

Please sign in to comment.