Obfuscate #line

This commit is contained in:
gingerBill
2024-04-08 16:14:47 +01:00
parent 810cf22e5d
commit ec45504631
3 changed files with 15 additions and 10 deletions

View File

@@ -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");