[project @ 2000-03-07 07:27:11 by andy]
authorandy <unknown>
Tue, 7 Mar 2000 07:27:11 +0000 (07:27 +0000)
committerandy <unknown>
Tue, 7 Mar 2000 07:27:11 +0000 (07:27 +0000)
Fixing a sprintf bug; it was clobering the symbol table.
If you used a name for a class and module, the module
was not recognised as read.

ghc/interpreter/type.c

index 645ffb5..1958b04 100644 (file)
@@ -9,8 +9,8 @@
  * included in the distribution.
  *
  * $RCSfile: type.c,v $
- * $Revision: 1.25 $
- * $Date: 2000/03/06 10:12:57 $
+ * $Revision: 1.26 $
+ * $Date: 2000/03/07 07:27:11 $
  * ------------------------------------------------------------------------*/
 
 #include "prelude.h"
@@ -1989,7 +1989,7 @@ Inst in; {                              /* member functions for instance in*/
           switch (whatIs(qq)) {
              case TYCON:  str = textToStr(tycon(qq).text); break;
              case TUPLE:  str = textToStr(ghcTupleText(qq)); break;
-             case OFFSET: sprintf(str,"%d",offsetOf(qq)); break;
+             case OFFSET: sprintf(&str,"%d",offsetOf(qq)); break;
              default: internal("typeInstDefn: making GHC name"); break;
           }
           for (j = 0; i<FILENAME_MAX && str[j]!='\0'; i++, j++) {