harec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit b5ae44efb55c923a8fdec5bf5326bf92481fd3be
parent 74d160f5cb767bc96a62fb7f33c07472680b46d9
Author: Eyal Sawady <ecs@d2evs.net>
Date:   Sun,  2 May 2021 12:14:18 -0400

eval_cast: implement floats

Signed-off-by: Eyal Sawady <ecs@d2evs.net>

Diffstat:
Msrc/eval.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/eval.c b/src/eval.c @@ -424,6 +424,8 @@ eval_cast(struct context *ctx, struct expression *in, struct expression *out) case STORAGE_F32: case STORAGE_F64: case STORAGE_FCONST: + out->constant.fval = ftrunc(to, val.constant.fval); + return EVAL_OK; case STORAGE_CHAR: case STORAGE_ENUM: case STORAGE_NULL: