Fix several double-related bug

float is promoted to double through ... for non-v6 code.
PR_Sprintf has custom param access via P_*, messed up doubles.
This commit is contained in:
Bill Currie 2020-02-14 18:15:34 +09:00
parent eb7f825158
commit 2cd62fe01b
8 changed files with 27 additions and 6 deletions

View file

@ -649,6 +649,8 @@ free_fmt_item (fmt_item_t *fi)
#undef P_var
#define P_var(p,n,t) (args[n]->t##_var)
#undef P_DOUBLE
#define P_DOUBLE(p,n) (*(double *) (args[n]))
VISIBLE void
PR_Sprintf (progs_t *pr, dstring_t *result, const char *name,
const char *format, int count, pr_type_t **args)