From eca82511c6a8576651d9d8c8925f138a19a40bb4 Mon Sep 17 00:00:00 2001 From: Dale Weiler Date: Mon, 14 Oct 2013 22:40:36 -0400 Subject: [PATCH] divVerent suggestion to use memcmp here --- fold.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fold.c b/fold.c index c4b474b..99ab737 100644 --- a/fold.c +++ b/fold.c @@ -279,7 +279,7 @@ ast_expression *fold_constgen_float(fold_t *fold, qcfloat_t value) { size_t i; for (i = 0; i < vec_size(fold->imm_float); i++) { - if (fold->imm_float[i]->constval.vfloat == value) + if (!memcmp(&fold->imm_float[i]->constval.vfloat, &value, sizeof(qcfloat_t))) return (ast_expression*)fold->imm_float[i]; } -- 2.39.2