projects
/
onyx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c1822c
)
fixed: #99
author
Brendan Hansen
<brendan.f.hansen@gmail.com>
Mon, 22 Jan 2024 03:06:26 +0000
(21:06 -0600)
committer
Brendan Hansen
<brendan.f.hansen@gmail.com>
Mon, 22 Jan 2024 03:06:26 +0000
(21:06 -0600)
compiler/src/utils.c
patch
|
blob
|
history
diff --git
a/compiler/src/utils.c
b/compiler/src/utils.c
index 4995c521eeb350cb69a5ac7322f8ac60eaa3e3a0..0206dd9fd44a0048dd7e8cd964f210046a6f80ad 100644
(file)
--- a/
compiler/src/utils.c
+++ b/
compiler/src/utils.c
@@
-1508,7
+1508,7
@@
char *find_closest_symbol_in_scope(Scope *scope, char *sym, u32 *out_distance) {
char* closest = NULL;
fori (i, 0, shlen(scope->symbols)) {
- if (scope->symbols[i].value->flags & Ast_Flag_Symbol_Invisible) continue;
+ if (scope->symbols[i].value
&& scope->symbols[i].value
->flags & Ast_Flag_Symbol_Invisible) continue;
char *key = scope->symbols[i].key;
u32 d = levenshtein_distance(key, sym);