From ec455046316ba1bf44a6f2118512341a3f68b10c Mon Sep 17 00:00:00 2001 From: gingerBill Date: Mon, 8 Apr 2024 16:14:47 +0100 Subject: Obfuscate `#line` --- src/common.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/common.cpp') 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 { -- cgit v1.2.3