diff options
| author | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2024-04-19 14:18:07 -0400 |
|---|---|---|
| committer | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2024-04-19 14:18:07 -0400 |
| commit | e953ebd2436ecaf645eaee83a18873a9dc590e75 (patch) | |
| tree | a6969fe3b49e490a161f817a9df1c47da0ca7f33 /src | |
| parent | 44035ebcf7df40cd24482cef5145394945284ca0 (diff) | |
Fix crash caused by slicing incomplete import
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/collector.odin | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/collector.odin b/src/server/collector.odin index 8279f55..fe103cf 100644 --- a/src/server/collector.odin +++ b/src/server/collector.odin @@ -854,7 +854,8 @@ get_package_mapping :: proc( if len(imp.fullpath) < 2 { continue } - if i := strings.index(imp.fullpath, ":"); i != -1 { + + if i := strings.index(imp.fullpath, ":"); i != -1 && i != len(imp.fullpath) - 1 { collection := imp.fullpath[1:i] p := imp.fullpath[i + 1:len(imp.fullpath) - 1] |