trivial diff: fix typo in io__resize_buffer

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Nov 6 02:18:35 AEDT 1998


Estimated hours taken: 0.25

library/io.m:
	Fix a bug: a typo in the C code for io__resize_buffer
	which could have caused it to crash in non-gc grades.

Index: library/io.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/io.m,v
retrieving revision 1.167
diff -u -r1.167 io.m
--- io.m	1998/11/05 06:48:18	1.167
+++ io.m	1998/11/05 15:14:26
@@ -1541,7 +1541,7 @@
 		/* just have to alloc and copy */
 		incr_hp_atomic(Buffer,
 		   (NewSize * sizeof(Char) + sizeof(Word) - 1) / sizeof(Word));
-		buffer = (Char *) buffer;
+		buffer = (Char *) Buffer;
 		if (OldSize > NewSize) {
 			memcpy(buffer, buffer0, NewSize);
 		} else {

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list