mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-17 07:02:51 -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: {
|
case PGF_TOKEN_FLT: {
|
||||||
char* str =
|
char* str =
|
||||||
gu_buf_data(parser->token_value);
|
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);
|
pgf_expr_parser_token(parser);
|
||||||
PgfLiteral lit =
|
PgfLiteral lit =
|
||||||
gu_new_variant_i(parser->expr_pool,
|
gu_new_variant_i(parser->expr_pool,
|
||||||
|
|||||||
Reference in New Issue
Block a user