瀏覽代碼

os2: fix get_executable_path() on FreeBSD including the nil-terminator

Laytan Laats 5 月之前
父節點
當前提交
74a66f7794
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      core/os/os2/path_freebsd.odin

+ 1 - 1
core/os/os2/path_freebsd.odin

@@ -25,5 +25,5 @@ _get_executable_path :: proc(allocator: runtime.Allocator) -> (path: string, err
 		return
 	}
 
-	return string(buf[:size]), nil
+	return string(buf[:size-1]), nil
 }