diff options
Diffstat (limited to 'libtommath/bn_mp_export.c')
-rw-r--r-- | libtommath/bn_mp_export.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libtommath/bn_mp_export.c b/libtommath/bn_mp_export.c index 6477dd9..58d71d5 100644 --- a/libtommath/bn_mp_export.c +++ b/libtommath/bn_mp_export.c @@ -31,12 +31,12 @@ int mp_export(void* rop, size_t* countp, int order, size_t size, } 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; } |