diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-04-29 13:23:05 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-04-29 13:23:05 -0400 |
| commit | 169129a1e634d355302b3e17658d46e2ae747d7b (patch) | |
| tree | 1a47a1696f454a83d3f3130d35f28628035106d9 | |
| parent | 01ff304a57a47aff623de114aeb83fe593a49d25 (diff) | |
Fix string long issues
| -rw-r--r-- | src/compile.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compile.c b/src/compile.c index c970d65c..35aa6566 100644 --- a/src/compile.c +++ b/src/compile.c @@ -1301,8 +1301,8 @@ static CORD _compile_statement(env_t *env, ast_t *ast) return CORD_all( "if (!(", compile_condition(env, expr), "))\n", "fail_source(", CORD_quoted(ast->file->filename), ", ", - String((long)(expr->start - expr->file->text)), ", ", - String((long)(expr->end - expr->file->text)), ", ", + String((int64_t)(expr->start - expr->file->text)), ", ", + String((int64_t)(expr->end - expr->file->text)), ", ", message ? CORD_all("Text$as_c_string(", compile_to_type(env, message, Type(TextType)), ")") : "\"This assertion failed!\"", ");\n"); @@ -2790,8 +2790,8 @@ CORD compile(env_t *env, ast_t *ast) return CORD_all("({ ", compile_declaration(t, "opt"), " = ", value_code, "; ", "if unlikely (", check_none(t, "opt"), ")\n", "fail_source(", CORD_quoted(ast->file->filename), ", ", - String((long)(value->start - value->file->text)), ", ", - String((long)(value->end - value->file->text)), ", ", + String((int64_t)(value->start - value->file->text)), ", ", + String((int64_t)(value->end - value->file->text)), ", ", "\"This was expected to be a value, but it's none\");\n", optional_into_nonnone(t, "opt"), "; })"); } |
