aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Gavin <danielgavin5@hotmail.com>2022-08-30 15:32:03 +0200
committerDaniel Gavin <danielgavin5@hotmail.com>2022-08-30 15:32:03 +0200
commit495f89bfead45fb7ad1201202cb6c9ec7c29bfeb (patch)
treed84663d9679056bf1e429bf47ffad1976f50a7af /src
parent75dca11547a4eaeddea891f5995b71ae4755d7ae (diff)
fix when package is empty
Diffstat (limited to 'src')
-rw-r--r--src/server/collector.odin3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/server/collector.odin b/src/server/collector.odin
index 008cbba..11b6b89 100644
--- a/src/server/collector.odin
+++ b/src/server/collector.odin
@@ -607,6 +607,9 @@ get_package_mapping :: proc(
for imp, index in file.imports {
//collection specified
+ if len(imp.fullpath) < 2 {
+ continue
+ }
if i := strings.index(imp.fullpath, ":"); i != -1 {
collection := imp.fullpath[1:i]
p := imp.fullpath[i + 1:len(imp.fullpath) - 1]