X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7f985bd39a0605d8dea4b4b1abc717c5658209c6..7aa88ac4af764fa92c781056bc23103cadea21a4:/src/common/http.cpp diff --git a/src/common/http.cpp b/src/common/http.cpp index 07ba17fa8b..221dddb876 100644 --- a/src/common/http.cpp +++ b/src/common/http.cpp @@ -97,12 +97,14 @@ void wxHTTP::SendHeaders() { wxNode *head = m_headers.First(); - while (head) { + while (head) + { wxString *str = (wxString *)head->Data(); - char buf[100]; - sprintf(buf, "%s: %s\n\r", head->GetKeyString(), str->GetData()); - Write(buf, strlen(buf)); + wxString buf; + buf.Printf("%s: %s\n\r", head->GetKeyString(), str->GetData()); + + Write(buf, buf.Len()); head = head->Next(); }