diff options
| author | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2025-03-03 19:18:54 -0500 |
|---|---|---|
| committer | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2025-03-03 19:18:54 -0500 |
| commit | 2d0dc44636c3f20bb1c41433a5d9cbd52098792b (patch) | |
| tree | 6f50ec10838c522ddb883f1d7c200d90e7bb9ebe /core/os | |
| parent | d6002d68a2f15a286694fc36a8dfc599d4f5be68 (diff) | |
Shorten buffers used for `os2.random_string` results
This is needed now that `os2.random_string` fills the whole slice.
Diffstat (limited to 'core/os')
| -rw-r--r-- | core/os/os2/temp_file.odin | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/os/os2/temp_file.odin b/core/os/os2/temp_file.odin index 5ca4e1453..e93117f02 100644 --- a/core/os/os2/temp_file.odin +++ b/core/os/os2/temp_file.odin @@ -20,7 +20,7 @@ create_temp_file :: proc(dir, pattern: string) -> (f: ^File, err: Error) { prefix, suffix := _prefix_and_suffix(pattern) or_return prefix = temp_join_path(dir, prefix) or_return - rand_buf: [32]byte + rand_buf: [10]byte name_buf := make([]byte, len(prefix)+len(rand_buf)+len(suffix), temp_allocator()) attempts := 0 @@ -52,7 +52,7 @@ make_directory_temp :: proc(dir, pattern: string, allocator: runtime.Allocator) prefix, suffix := _prefix_and_suffix(pattern) or_return prefix = temp_join_path(dir, prefix) or_return - rand_buf: [32]byte + rand_buf: [10]byte name_buf := make([]byte, len(prefix)+len(rand_buf)+len(suffix), temp_allocator()) attempts := 0 |