summaryrefslogtreecommitdiff
path: root/src/runner/runner.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/runner/runner.c')
-rw-r--r--src/runner/runner.c4
1 files changed, 2 insertions, 2 deletions
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 <stdio.h>
-#include <string.h>
#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");