diff options
Diffstat (limited to 'libtommath/bn_mp_import.c')
-rw-r--r-- | libtommath/bn_mp_import.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libtommath/bn_mp_import.c b/libtommath/bn_mp_import.c index c615a84..d9248fd 100644 --- a/libtommath/bn_mp_import.c +++ b/libtommath/bn_mp_import.c @@ -27,12 +27,12 @@ int mp_import(mp_int* rop, size_t count, int order, size_t size, mp_zero(rop); if (endian == 0) { - union {
- unsigned int i;
- char c[4];
+ union { + unsigned int i; + char c[4]; } lint; - lint.i = 0x01020304;
-
+ lint.i = 0x01020304; + endian = (lint.c[0] == 4) ? -1 : 1; } |