diff: fix bug with deep_copy of type_info

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Feb 23 04:17:43 AEDT 1999


Estimated hours taken: 0.5

runtime/mercury_deep_copy_body.h:
	Fix a bug: the recursive call to copy_type_info was passing the
	type_info when it should have been passing the address of the
	type_info.

Index: runtime/mercury_deep_copy_body.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_deep_copy_body.h,v
retrieving revision 1.2
diff -u -r1.2 mercury_deep_copy_body.h
--- mercury_deep_copy_body.h	1998/11/03 10:58:27	1.2
+++ mercury_deep_copy_body.h	1999/02/22 17:11:51
@@ -343,7 +343,7 @@
 		new_type_info[0] = type_info[0];
 		for (i = 1; i < arity + 1; i++) {
 			new_type_info[i] = (Word) copy_type_info(
-				(Word *) type_info[i],
+				&type_info[i],
 				lower_limit, upper_limit);
 		}
                 leave_forwarding_pointer(type_info_ptr, (Word) new_type_info);

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "Binaries may die
WWW: <http://www.cs.mu.oz.au/~fjh>  |   but source code lives forever"
PGP: finger fjh at 128.250.37.3        |     -- leaked Microsoft memo.



More information about the developers mailing list