* win32/win32.c (rb_w32_strerror): remove all CR and LF. (avoid broken

error message on bccwin32 + winsock)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ocean 2005-11-28 04:24:26 +00:00
parent 1e85f16423
commit c43a23d49e
2 changed files with 8 additions and 3 deletions

View file

@ -1759,9 +1759,9 @@ rb_w32_strerror(int e)
buffer[sizeof(buffer) - 1] = 0;
}
for (p = buffer + strlen(buffer) - 1; buffer <= p; p--) {
if (*p != '\r' && *p != '\n') break;
*p = 0;
p = buffer;
while ((p = strpbrk(p, "\r\n")) != NULL) {
memmove(p, p + 1, strlen(p));
}
return buffer;
}