diff --git a/stage1/wasm2c.c b/stage1/wasm2c.c index ae47d55b91..10c0a0c3de 100644 --- a/stage1/wasm2c.c +++ b/stage1/wasm2c.c @@ -261,13 +261,13 @@ int main(int argc, char **argv) { " uint8_t *new_m = *m;\n" " uint32_t r = *p;\n" " uint32_t new_p = r + n;\n" - " if (new_p > UINT32_C(0x10000)) return UINT32_C(0xFFFFFFF);\n" + " if (new_p > UINT32_C(0xFFFF)) return UINT32_C(0xFFFFFFFF);\n" " uint32_t new_c = *c;\n" " if (new_c < new_p) {\n" " do new_c += new_c / 2 + 8; while (new_c < new_p);\n" - " if (new_c > UINT32_C(0x10000)) new_c = UINT32_C(0x10000);\n" + " if (new_c > UINT32_C(0xFFFF)) new_c = UINT32_C(0xFFFF);\n" " new_m = realloc(new_m, new_c << 16);\n" - " if (new_m == NULL) return UINT32_C(0xFFFFFFF);\n" + " if (new_m == NULL) return UINT32_C(0xFFFFFFFF);\n" " *m = new_m;\n" " *c = new_c;\n" " }\n"