diff options
| author | gingerBill <bill@gingerbill.org> | 2024-04-08 16:14:47 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-04-08 16:14:47 +0100 |
| commit | ec455046316ba1bf44a6f2118512341a3f68b10c (patch) | |
| tree | 117a32f4d05ae6831dcb56fffa5f8b140f140aa2 /src/common.cpp | |
| parent | 810cf22e5ddd772ee214eec306b1ba148623302c (diff) | |
Obfuscate `#line`
Diffstat (limited to 'src/common.cpp')
| -rw-r--r-- | src/common.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common.cpp b/src/common.cpp index 6a53332d9..e0a579c5d 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -364,6 +364,14 @@ gb_internal String obfuscate_string(String const &s, char const *prefix) { return make_string_c(res); } +gb_internal i32 obfuscate_i32(i32 i) { + i32 x = cast(i32)gb_fnv64a(&i, sizeof(i)); + if (x < 0) { + x = 1-x; + } + return cast(i32)x; +} + struct StringIntern { |