]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
divVerent suggestion to use memcmp here
authorDale Weiler <killfieldengine@gmail.com>
Tue, 15 Oct 2013 02:40:36 +0000 (22:40 -0400)
committerDale Weiler <killfieldengine@gmail.com>
Tue, 15 Oct 2013 02:40:36 +0000 (22:40 -0400)
fold.c

diff --git a/fold.c b/fold.c
index c4b474bdf79605f0d914f98b99a78f1d953048c0..99ab73773dba2573a3659a234992d4d773d5c4a8 100644 (file)
--- 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];
     }