diff options
| author | Laytan <laytanlaats@hotmail.com> | 2025-07-20 13:12:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-20 13:12:45 +0200 |
| commit | 089d8a229cbb6cbc302dbc3fb743af49171a7b48 (patch) | |
| tree | 2f4899a836fc8fda554c8ce728d40e1a02f56b76 | |
| parent | 50358380ae5fc0bc7da3ca44286d15e6fce16ec8 (diff) | |
| parent | 4ccdb48044b6a5c5172d69eac61210329fff6b65 (diff) | |
Merge pull request #5479 from wisonye/master
Fixed Index 0 is out of range 0..<0' when using '-default-to-nil-allocator' for FreeBSD/OpenBSD/NetBSD/Linux
| -rw-r--r-- | core/os/os_freebsd.odin | 4 | ||||
| -rw-r--r-- | core/os/os_linux.odin | 4 | ||||
| -rw-r--r-- | core/os/os_netbsd.odin | 4 | ||||
| -rw-r--r-- | core/os/os_openbsd.odin | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/core/os/os_freebsd.odin b/core/os/os_freebsd.odin index f57c464ac..aeffdcb87 100644 --- a/core/os/os_freebsd.odin +++ b/core/os/os_freebsd.odin @@ -967,8 +967,8 @@ _processor_core_count :: proc() -> int { @(private, require_results) _alloc_command_line_arguments :: proc() -> []string { res := make([]string, len(runtime.args__)) - for arg, i in runtime.args__ { - res[i] = string(arg) + for _, i in res { + res[i] = string(runtime.args__[i]) } return res } diff --git a/core/os/os_linux.odin b/core/os/os_linux.odin index 683c893f9..66c30711d 100644 --- a/core/os/os_linux.odin +++ b/core/os/os_linux.odin @@ -1100,8 +1100,8 @@ _processor_core_count :: proc() -> int { @(private, require_results) _alloc_command_line_arguments :: proc() -> []string { res := make([]string, len(runtime.args__)) - for arg, i in runtime.args__ { - res[i] = string(arg) + for _, i in res { + res[i] = string(runtime.args__[i]) } return res } diff --git a/core/os/os_netbsd.odin b/core/os/os_netbsd.odin index efdd852fe..accc5abcd 100644 --- a/core/os/os_netbsd.odin +++ b/core/os/os_netbsd.odin @@ -1017,8 +1017,8 @@ _processor_core_count :: proc() -> int { @(private, require_results) _alloc_command_line_arguments :: proc() -> []string { res := make([]string, len(runtime.args__)) - for arg, i in runtime.args__ { - res[i] = string(arg) + for _, i in res { + res[i] = string(runtime.args__[i]) } return res } diff --git a/core/os/os_openbsd.odin b/core/os/os_openbsd.odin index c68f7943c..ec9181ba6 100644 --- a/core/os/os_openbsd.odin +++ b/core/os/os_openbsd.odin @@ -917,8 +917,8 @@ _processor_core_count :: proc() -> int { @(private, require_results) _alloc_command_line_arguments :: proc() -> []string { res := make([]string, len(runtime.args__)) - for arg, i in runtime.args__ { - res[i] = string(arg) + for _, i in res { + res[i] = string(runtime.args__[i]) } return res } |