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/check_expr.cpp | |
| parent | 810cf22e5ddd772ee214eec306b1ba148623302c (diff) | |
Obfuscate `#line`
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 7d8e0f829..b893b3a00 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -8164,8 +8164,12 @@ gb_internal ExprKind check_basic_directive_expr(CheckerContext *c, Operand *o, A o->type = t_untyped_string; o->value = exact_value_string(file); } else if (name == "line") { + i32 line = bd->token.pos.line; + if (build_context.obfuscate_source_code_locations) { + line = obfuscate_i32(line); + } o->type = t_untyped_integer; - o->value = exact_value_i64(bd->token.pos.line); + o->value = exact_value_i64(line); } else if (name == "procedure") { if (c->curr_proc_decl == nullptr) { error(node, "#procedure may only be used within procedures"); |