diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-10-19 14:42:49 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-10-19 14:42:49 -0400 |
| commit | c814ebe71f18514c381c33aef574df0edcd0adf2 (patch) | |
| tree | d265aeafe66e85182822e365723f8ea5b181b526 /src/compile | |
| parent | a97e85655baa105642de383d11e7e7d636ecca94 (diff) | |
Fix signed comparison issues
Diffstat (limited to 'src/compile')
| -rw-r--r-- | src/compile/loops.c | 2 | ||||
| -rw-r--r-- | src/compile/text.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/compile/loops.c b/src/compile/loops.c index 588be4f0..96299c5e 100644 --- a/src/compile/loops.c +++ b/src/compile/loops.c @@ -189,7 +189,7 @@ Text_t compile_for_loop(env_t *env, ast_t *ast) { return loop; } case TableType: { - Text_t loop = Text("for (int64_t i = 0; i < iterating.length; ++i) {\n"); + Text_t loop = Text("for (int64_t i = 0; i < (int64_t)iterating.length; ++i) {\n"); if (for_->vars) { Text_t key = compile(body_scope, for_->vars->ast); type_t *key_t = Match(iter_value_t, TableType)->key_type; diff --git a/src/compile/text.c b/src/compile/text.c index 637ad60c..3a8a227c 100644 --- a/src/compile/text.c +++ b/src/compile/text.c @@ -79,7 +79,7 @@ Text_t compile_text_literal(Text_t literal) { PUREFUNC static bool string_literal_is_all_ascii(Text_t literal) { TextIter_t state = NEW_TEXT_ITER_STATE(literal); - for (int64_t i = 0; i < literal.length; i++) { + for (int64_t i = 0; i < (int64_t)literal.length; i++) { int32_t g = Text$get_grapheme_fast(&state, i); if (g < 0 || g > 127 || !isascii(g)) return false; } |
