diff options
| author | gingerBill <bill@gingerbill.org> | 2018-05-27 10:49:14 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-05-27 10:49:14 +0100 |
| commit | 7ee9051a56ca0c04e6b60f53b9dfe47c75596496 (patch) | |
| tree | 619c13b7d86105fcfda13d315c0c315e7005630a /src/string.cpp | |
| parent | eb11edabe092541144cd3ba18b09bd11fcf7a958 (diff) | |
IR now builds with the new package system
Diffstat (limited to 'src/string.cpp')
| -rw-r--r-- | src/string.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/string.cpp b/src/string.cpp index b63de5c76..32d97184a 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -259,7 +259,10 @@ bool string_contains_char(String const &s, u8 c) { String filename_from_path(String s) { isize i = string_extension_position(s); - s = substring(s, 0, i); + if (i >= 0) { + s = substring(s, 0, i); + return s; + } if (i > 0) { isize j = 0; for (j = s.len-1; j >= 0; j--) { |