Browse Source

Fix path.name failing to remove extension

jockus 5 years ago
parent
commit
8de70ce73d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      core/path/path.odin

+ 2 - 2
core/path/path.odin

@@ -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 := dot - 1;
+	end := len(path) - 1;
+	dot := end;
 
 
 	for i := end; i >= 0; i -= 1 {
 	for i := end; i >= 0; i -= 1 {
 		switch path[i] {
 		switch path[i] {