aboutsummaryrefslogtreecommitdiff
path: root/src/common.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2019-12-01 14:10:59 +0000
committergingerBill <bill@gingerbill.org>2019-12-01 14:10:59 +0000
commit9db81498d8fbf4b24383cd7de94619943ad4e01a (patch)
tree6263d1649607f44a1d8affc2baf1d39da906698f /src/common.cpp
parent7fbe0a6f2385e618ea4d3a724d2ed6147b6921bf (diff)
Make the `string` type elements "immutable", akin to `char const *` in C
Allows for extra security and optimization benefits
Diffstat (limited to 'src/common.cpp')
-rw-r--r--src/common.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common.cpp b/src/common.cpp
index f47ad69eb..779554ecc 100644
--- a/src/common.cpp
+++ b/src/common.cpp
@@ -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