summaryrefslogtreecommitdiffstats
path: root/byterun/parsing.c
diff options
context:
space:
mode:
Diffstat (limited to 'byterun/parsing.c')
-rw-r--r--byterun/parsing.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/byterun/parsing.c b/byterun/parsing.c
index 6aeaeb14f..f4caea09b 100644
--- a/byterun/parsing.c
+++ b/byterun/parsing.c
@@ -59,8 +59,8 @@ struct parser_env { /* Mirrors parser_env in ../stdlib/parsing.ml */
#ifdef ARCH_BIG_ENDIAN
#define Short(tbl,n) \
- (*((unsigned char *)((tbl) + (n) * sizeof(short))) + \
- (*((schar *)((tbl) + (n) * sizeof(short) + 1)) << 8))
+ (*((unsigned char *)((tbl) + (n) * 2)) + \
+ (*((schar *)((tbl) + (n) * 2 + 1)) << 8))
#else
#define Short(tbl,n) (((short *)(tbl))[n])
#endif