aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-04-08 16:18:14 +0100
committergingerBill <bill@gingerbill.org>2024-04-08 16:18:14 +0100
commitecac3aef3275e199deac2ce568647d14049f9e49 (patch)
tree9f2469b7e811722e4f8293fab7e2b1cd482412b3
parentec455046316ba1bf44a6f2118512341a3f68b10c (diff)
Change allocator to permanent
-rw-r--r--src/common.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common.cpp b/src/common.cpp
index e0a579c5d..69426e2a6 100644
--- a/src/common.cpp
+++ b/src/common.cpp
@@ -355,11 +355,11 @@ gb_global bool global_module_path_set = false;
gb_internal String obfuscate_string(String const &s, char const *prefix) {
if (s.len == 0) {
- return {};
+ return s;
}
GB_ASSERT(prefix != nullptr);
u64 hash = gb_fnv64a(s.text, s.len);
- gbString res = gb_string_make(temporary_allocator(), prefix);
+ gbString res = gb_string_make(permanent_allocator(), prefix);
res = gb_string_append_fmt(res, "x%llx", cast(long long unsigned)hash);
return make_string_c(res);
}