Fix path.name failing to remove extension

This commit is contained in:
jockus committed 2020-08-26 17:32:47 +01:00
1 parent 7309cfdbb2
commit 8de70ce73d
1 file changed
+2 -2
+2 -2
View File
@@ -48,8 +48,8 @@ base :: proc(path: string, new := false, allocator := context.allocator) -> stri
name :: proc(path: string, new := false, allocator := context.allocator) -> string { name :: proc(path: string, new := false, allocator := context.allocator) -> string {
if path == "" do return ""; if path == "" do return "";
dot := len(path); end := len(path) - 1;
end := dot - 1; dot := end;
for i := end; i >= 0; i -= 1 { for i := end; i >= 0; i -= 1 {
switch path[i] { switch path[i] {