fix for reading PgfExpr with a double literal

This commit is contained in:
krasimir
2016-04-13 14:08:49 +00:00
parent 68ebfe9de2
commit c0344e936a

View File

@@ -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,