summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib.h b/lib.h
index 5d095108..d2d7a486 100644
--- a/lib.h
+++ b/lib.h
@@ -491,7 +491,11 @@ INLINE wchar_t *litptr(val obj)
INLINE val num_fast(cnum n)
{
+#if HAVE_UBSAN
+ return coerce(val, (n * (1 << TAG_SHIFT)) | TAG_NUM);
+#else
return coerce(val, (n << TAG_SHIFT) | TAG_NUM);
+#endif
}
INLINE mp_int *mp(val bign)