Change 13076 by jhi@alpha on 2001/11/18 16:46:11

        All of syswrite/send/sendto need to return character counts,
        and character counts from the offset, not the beginning of
        the scalar.

Affected files ...

.... //depot/perl/pp_sys.c#267 edit

Differences ...

==== //depot/perl/pp_sys.c#267 (text) ====
Index: perl/pp_sys.c
--- perl/pp_sys.c.~1~   Sun Nov 18 10:00:06 2001
+++ perl/pp_sys.c       Sun Nov 18 10:00:06 2001
@@ -1842,9 +1842,6 @@
            /* See the note at doio.c:do_print about filesize limits. --jhi */
            retval = PerlLIO_write(PerlIO_fileno(IoIFP(io)),
                                   buffer, length);
-           if (DO_UTF8(bufsv))
-               retval = utf8_length((U8*)SvPVX(bufsv),
-                                    (U8*)SvPVX(bufsv) + retval);
        }
     }
 #ifdef HAS_SOCKET
@@ -1866,6 +1863,8 @@
     if (retval < 0)
        goto say_undef;
     SP = ORIGMARK;
+    if (DO_UTF8(bufsv))
+        retval = utf8_length((U8*)buffer, (U8*)buffer + retval);
 #if Size_t_size > IVSIZE
     PUSHn(retval);
 #else
End of Patch.

Reply via email to