aboutsummaryrefslogtreecommitdiff
path: root/src/lj_crecord.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lj_crecord.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_crecord.c b/src/lj_crecord.c
index e0f581ca..9c9b6ccb 100644
--- a/src/lj_crecord.c
+++ b/src/lj_crecord.c
@@ -1879,7 +1879,8 @@ TRef recff_bit64_tohex(jit_State *J, RecordFFData *rd, TRef hdr)
1879 } else { 1879 } else {
1880 n = id ? 16 : 8; 1880 n = id ? 16 : 8;
1881 } 1881 }
1882 if (n < 0) { n = -n; sf |= STRFMT_F_UPPER; } 1882 if (n < 0) { n = (int32_t)(~n+1u); sf |= STRFMT_F_UPPER; }
1883 if ((uint32_t)n > 254) n = 254;
1883 sf |= ((SFormat)((n+1)&255) << STRFMT_SH_PREC); 1884 sf |= ((SFormat)((n+1)&255) << STRFMT_SH_PREC);
1884 if (id) { 1885 if (id) {
1885 tr = crec_ct_tv(J, ctype_get(cts, id), 0, J->base[0], &rd->argv[0]); 1886 tr = crec_ct_tv(J, ctype_get(cts, id), 0, J->base[0], &rd->argv[0]);