summaryrefslogtreecommitdiffstats
path: root/src/glsl/pp/sl_pp_line.c
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2009-09-22 12:51:08 +0200
committerMichal Krol <[email protected]>2009-09-22 12:51:08 +0200
commit0481e85af7195e13c30580afba233a80feeee740 (patch)
tree6c9d69005a67424d41b6a1a04c9ab1dee087b796 /src/glsl/pp/sl_pp_line.c
parentbb32b0908ff0d3a99758abd46356676fc1ec2369 (diff)
glsl/pp: Differentiate between integer and floating-point number tokens.
Diffstat (limited to 'src/glsl/pp/sl_pp_line.c')
-rw-r--r--src/glsl/pp/sl_pp_line.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/glsl/pp/sl_pp_line.c b/src/glsl/pp/sl_pp_line.c
index cab0262686c..e8f751003ac 100644
--- a/src/glsl/pp/sl_pp_line.c
+++ b/src/glsl/pp/sl_pp_line.c
@@ -67,8 +67,8 @@ sl_pp_process_line(struct sl_pp_context *context,
}
}
- if (state.out_len > 0 && state.out[0].token == SL_PP_NUMBER) {
- line_number = state.out[0].data.number;
+ if (state.out_len > 0 && state.out[0].token == SL_PP_UINT) {
+ line_number = state.out[0].data._uint;
} else {
strcpy(context->error_msg, "expected a number after `#line'");
free(state.out);
@@ -76,8 +76,8 @@ sl_pp_process_line(struct sl_pp_context *context,
}
if (state.out_len > 1) {
- if (state.out[1].token == SL_PP_NUMBER) {
- file_number = state.out[1].data.number;
+ if (state.out[1].token == SL_PP_UINT) {
+ file_number = state.out[1].data._uint;
} else {
strcpy(context->error_msg, "expected a number after line number");
free(state.out);