diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2024-04-20 19:33:26 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-20 19:33:26 +0200 |
| commit | e0ff70f609e8c1629fc39920ea39e1bdef0a1d68 (patch) | |
| tree | a6969fe3b49e490a161f817a9df1c47da0ca7f33 /src/server | |
| parent | 44035ebcf7df40cd24482cef5145394945284ca0 (diff) | |
| parent | e953ebd2436ecaf645eaee83a18873a9dc590e75 (diff) | |
Merge pull request #361 from Feoramund/fix-crash-on-save-incomplete-import
Fix crash caused by slicing incomplete import
Diffstat (limited to 'src/server')
| -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] |