diff options
author | Michal Krol <[email protected]> | 2009-09-04 15:16:21 +0200 |
---|---|---|
committer | Michal Krol <[email protected]> | 2009-09-07 10:12:07 +0200 |
commit | 4aa3222df315e3b36c73374e9000a6607c3b995c (patch) | |
tree | 6f8fd9d68f913fa9f15e954c7263580ccc164ddc /src/glsl/pp/sl_pp_macro.c | |
parent | 0d9c5eafeb35fdd2e5009ba0b397d1acdfbd3205 (diff) |
glsl: Correctly handle line numbering.
Diffstat (limited to 'src/glsl/pp/sl_pp_macro.c')
-rw-r--r-- | src/glsl/pp/sl_pp_macro.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/glsl/pp/sl_pp_macro.c b/src/glsl/pp/sl_pp_macro.c index bacd468964c..b6214f66edc 100644 --- a/src/glsl/pp/sl_pp_macro.c +++ b/src/glsl/pp/sl_pp_macro.c @@ -131,14 +131,14 @@ sl_pp_macro_expand(struct sl_pp_context *context, macro_name = input[*pi].data.identifier; macro_str = sl_pp_context_cstr(context, macro_name); - /* TODO: Having the following built-ins hardcoded is a bit lame. */ if (!strcmp(macro_str, "__LINE__")) { - if (!mute && _out_number(context, state, 1)) { + if (!mute && _out_number(context, state, context->line)) { return -1; } (*pi)++; return 0; } + /* TODO: Having the following built-ins hardcoded is a bit lame. */ if (!strcmp(macro_str, "__FILE__")) { if (!mute && _out_number(context, state, 0)) { return -1; |