diff dmd/expression.c @ 413:1a9bdbd4ac60

Make RealEquals only compare the data bytes. Fixes run/t/template_class_13_* regressions introduced in [r401].
author Christian Kamm <kamm incasoftware de>
date Sun, 27 Jul 2008 18:52:40 +0200
parents 62715be72a06
children 491264b7cb93
line wrap: on
line diff
--- a/dmd/expression.c	Sun Jul 27 17:53:49 2008 +0200
+++ b/dmd/expression.c	Sun Jul 27 18:52:40 2008 +0200
@@ -1498,7 +1498,7 @@
 	/* In some cases, the REALPAD bytes get garbage in them,
 	 * so be sure and ignore them.
 	 */
-	memcmp(&x1, &x2, sizeof(real_t)) == 0;
+	memcmp(&x1, &x2, REAL_T_SIZE - REAL_T_PAD) == 0;
 }
 
 int RealExp::equals(Object *o)