From: Dale Weiler Date: Tue, 15 Oct 2013 02:40:36 +0000 (-0400) Subject: divVerent suggestion to use memcmp here X-Git-Tag: 0.3.5~25 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=eca82511c6a8576651d9d8c8925f138a19a40bb4;p=xonotic%2Fgmqcc.git divVerent suggestion to use memcmp here --- 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]; }