Browse Source

fix crash when you have 2 `#load_directory` calls with the same path

Laytan Laats 1 year ago
parent
commit
4f5b2bd127
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/check_builtin.cpp

+ 2 - 0
src/check_builtin.cpp

@@ -1345,6 +1345,8 @@ gb_internal LoadDirectiveResult check_load_directory_directive(CheckerContext *c
 			map_set(&c->info->load_directory_map, call, new_cache);
 		} else {
 			cache->file_error = file_error;
+
+			map_set(&c->info->load_directory_map, call, cache);
 		}
 	});