diff options
| author | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2025-03-20 14:43:54 -0400 |
|---|---|---|
| committer | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2025-03-20 14:43:54 -0400 |
| commit | a495cd581c268b96ad9034c4569293de1f9e3156 (patch) | |
| tree | 6766a5ddd9ed5142aec1babb9bfd9366eaeff71d /core/os | |
| parent | a91d528af662fbcedfa30b3d860739f09eb7acd6 (diff) | |
Assert that `_Path_Separator` is 7-bit ASCII
There are several places where this is assumed to be true, most visibly
in `is_path_separator`, as it takes a `byte` argument.
Note that the data type of `_Path_Separator` is a rune, which allows any
Unicode value.
Diffstat (limited to 'core/os')
| -rw-r--r-- | core/os/os2/path.odin | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/os/os2/path.odin b/core/os/os2/path.odin index 9231307f5..7d177a85d 100644 --- a/core/os/os2/path.odin +++ b/core/os/os2/path.odin @@ -8,6 +8,8 @@ Path_Separator :: _Path_Separator // OS-Specific Path_Separator_String :: _Path_Separator_String // OS-Specific Path_List_Separator :: _Path_List_Separator // OS-Specific +#assert(_Path_Separator <= rune(0x7F), "The system-specific path separator rune is expected to be within the 7-bit ASCII character set.") + @(require_results) is_path_separator :: proc(c: byte) -> bool { return _is_path_separator(c) |