Fix crash on interpreter parsing

This commit is contained in:
1024jp 2017-12-05 22:58:08 +09:00
parent 8b0f2b1f07
commit ab34f00204
2 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ Change Log
### Fixes
- Fix an issue where items in the Script menu were not sorted by prefix numbers.
- Fix a possible crash on handling documents with an invalid shebang.

View File

@ -565,7 +565,7 @@ private extension String {
// use first arg if the path targets env
if interpreter == "env" {
return components[1]
return components[safe: 1]
}
return interpreter