mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-10-30 02:13:18 -06:00
fix for reading PgfExpr with a double literal
This commit is contained in:
1 parent
68ebfe9de2
commit
c0344e936a
1 file changed
+3
-1
@@ -494,7 +494,9 @@ pgf_expr_parser_term(PgfExprParser* parser)
|
||||
case PGF_TOKEN_FLT: {
|
||||
char* str =
|
||||
gu_buf_data(parser->token_value);
|
||||
double d = atof(str);
|
||||
double d;
|
||||
if (!gu_string_to_double(str,&d))
|
||||
return gu_null_variant;
|
||||
pgf_expr_parser_token(parser);
|
||||
PgfLiteral lit =
|
||||
gu_new_variant_i(parser->expr_pool,
|
||||
|
||||
Reference in new issue
Block a user