mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 06:10:56 +00:00
[util] Fix types for double and float constants
This commit is contained in:
parent
55445a25f2
commit
5b842da394
1 changed files with 2 additions and 2 deletions
|
@ -241,14 +241,14 @@ static exprval_t *parse_uint (const char *str, exprctx_t *context)
|
|||
|
||||
static exprval_t *parse_float (const char *str, exprctx_t *context)
|
||||
{
|
||||
exprval_t *val = cexpr_value (&cexpr_int, context);
|
||||
exprval_t *val = cexpr_value (&cexpr_float, context);
|
||||
*(float *) val->value = strtof (str, 0);
|
||||
return val;
|
||||
}
|
||||
|
||||
static exprval_t *parse_double (const char *str, exprctx_t *context)
|
||||
{
|
||||
exprval_t *val = cexpr_value (&cexpr_int, context);
|
||||
exprval_t *val = cexpr_value (&cexpr_double, context);
|
||||
*(double *) val->value = strtod (str, 0);
|
||||
return val;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue