Commit b19750633c3f61a22f523d48cac1a337af4ac76d

Francois Perrad 2019-10-10T20:15:13

use literal char

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/tommath_private.h b/tommath_private.h
index 869f613..7c167a5 100644
--- a/tommath_private.h
+++ b/tommath_private.h
@@ -240,7 +240,7 @@ MP_DEPRECATED(s_mp_reverse) void bn_reverse(unsigned char *s, int len);
    do{\
       int16_t n = 0x1;                                          \
       char *p = (char *)&n;                                     \
-      x = (p[0] == 1) ? MP_LITTLE_ENDIAN : MP_BIG_ENDIAN;  \
+      x = (p[0] == '\x01') ? MP_LITTLE_ENDIAN : MP_BIG_ENDIAN;  \
    } while (0)
 
 /* code-generating macros */