summaryrefslogtreecommitdiffstats
path: root/src/glsl/pp/sl_pp_expression.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_expression.c
parentbb32b0908ff0d3a99758abd46356676fc1ec2369 (diff)
glsl/pp: Differentiate between integer and floating-point number tokens.
Diffstat (limited to 'src/glsl/pp/sl_pp_expression.c')
-rw-r--r--src/glsl/pp/sl_pp_expression.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/glsl/pp/sl_pp_expression.c b/src/glsl/pp/sl_pp_expression.c
index 6b2329ed1a7..5093ef6cc9d 100644
--- a/src/glsl/pp/sl_pp_expression.c
+++ b/src/glsl/pp/sl_pp_expression.c
@@ -42,8 +42,8 @@ static int
_parse_primary(struct parse_context *ctx,
int *result)
{
- if (ctx->input->token == SL_PP_NUMBER) {
- *result = atoi(sl_pp_context_cstr(ctx->context, ctx->input->data.number));
+ if (ctx->input->token == SL_PP_UINT) {
+ *result = atoi(sl_pp_context_cstr(ctx->context, ctx->input->data._uint));
ctx->input++;
} else {
if (ctx->input->token != SL_PP_LPAREN) {