mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-18 00:48:23 +00:00
Make the string type elements "immutable", akin to char const * in C
Allows for extra security and optimization benefits
This commit is contained in:
@@ -753,8 +753,8 @@ String path_to_full_path(gbAllocator a, String path) {
|
||||
String res = string_trim_whitespace(make_string_c(fullpath));
|
||||
#if defined(GB_SYSTEM_WINDOWS)
|
||||
for (isize i = 0; i < res.len; i++) {
|
||||
if (res[i] == '\\') {
|
||||
res[i] = '/';
|
||||
if (res.text[i] == '\\') {
|
||||
res.text[i] = '/';
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user