mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-16 08:19:31 -06:00
fix for reading PgfExpr with a double literal
This commit is contained in:
@@ -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