From cdf4de6611179a0cfbfdf025729c7fdd1151a136 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Fri, 15 Jan 2021 10:55:56 -0500 Subject: [PATCH] Issue #432 - Use standard integer data types Previous non-standard declarations were causing problems on WASM platform --- runtime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime.c b/runtime.c index 4d802eec..54711550 100644 --- a/runtime.c +++ b/runtime.c @@ -3568,7 +3568,7 @@ static int Cyc_checked_mul(int x, int y, int *result) { // Avoid undefined behavior by detecting overflow prior to multiplication // Based on code from Hacker's Delight and CHICKEN scheme - uint xu, yu, c; + unsigned int xu, yu, c; c = (1UL<<30UL) - 1; xu = x < 0 ? -x : x; yu = y < 0 ? -y : y; @@ -8126,7 +8126,7 @@ uint32_t Cyc_utf8_validate(char *str, size_t len) { */ int Cyc_utf8_encode(char *dest, int sz, uint32_t *src, int srcsz) { - u_int32_t ch; + uint32_t ch; int i = 0; char *dest_end = dest + sz;