Ehlo:
  I'm not too sure if this is necessary but it seems logical to get things
into charsets our compilers can handle.  Hopefully this is the correct
approach . . . . also this should NULL terminate in the event that the
entire buffer had not yet been filled.

Roman


Index: string.c
===================================================================
RCS file: /cvs/public/parrot/string.c,v
retrieving revision 1.73
diff -u -d -r1.73 string.c
--- string.c    15 Apr 2002 20:34:28 -0000      1.73
+++ string.c    17 Apr 2002 18:26:19 -0000
@@ -797,12 +797,15 @@
 {
     char *cstring;
 
+    if (s->encoding != encoding_lookup("singlebyte"))
+        s = string_transcode(interpreter, s, NULL, string_native_type, NULL);
+
     if (s->buflen == s->bufused)
         string_grow(interpreter, s, 1);
 
     cstring = s->bufstart;
 
-    cstring[s->bufused] = 0;
+    cstring[s->buflen + 1] = 0;
 
     return cstring;
 }

Reply via email to