From 85bfc724dd2bdaa2259512c1b8ab21f7dfeca8f1 Mon Sep 17 00:00:00 2001 From: A404M Date: Sat, 26 Apr 2025 01:21:12 +0330 Subject: clean up --- src/runner/runner.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/runner/runner.c') diff --git a/src/runner/runner.c b/src/runner/runner.c index 2e8c347..f33f056 100644 --- a/src/runner/runner.c +++ b/src/runner/runner.c @@ -2,8 +2,8 @@ #include "compiler/ast-tree.h" #include "utils/log.h" #include "utils/memory.h" +#include "utils/string.h" #include -#include #define doOperation(op0, op1, operator, originalType, type) \ *((originalType *)(op0)->metadata) = \ @@ -53,7 +53,7 @@ bool runAstTree(AstTreeRoots roots) { AstTreeVariable *variable = root->variables.data[i]; size_t name_size = variable->name_end - variable->name_begin; if (name_size == MAIN_STR_SIZE && - strncmp(variable->name_begin, MAIN_STR, MAIN_STR_SIZE) == 0 && + strnEquals(variable->name_begin, MAIN_STR, MAIN_STR_SIZE) && variable->type->token == AST_TREE_TOKEN_TYPE_FUNCTION) { if (mainVariable != NULL) { printLog("Too many main variables"); -- cgit v1.2.3