]> git.saurik.com Git - wxWidgets.git/commitdiff
Initialize all wxHTTPStream members in ctor.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 23 Jan 2013 11:44:30 +0000 (11:44 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 23 Jan 2013 11:44:30 +0000 (11:44 +0000)
Don't leave m_httpsize and m_read_bytes uninitialized.

Closes #14993.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/http.cpp

index f70b6fe9da41c3e874985d8e8315e1039c08fa61..556618aca517d6c48253be620a457cbb19c6cea5 100644 (file)
@@ -477,7 +477,13 @@ public:
     size_t m_httpsize;
     unsigned long m_read_bytes;
 
     size_t m_httpsize;
     unsigned long m_read_bytes;
 
-    wxHTTPStream(wxHTTP *http) : wxSocketInputStream(*http), m_http(http) {}
+    wxHTTPStream(wxHTTP *http) : wxSocketInputStream(*http)
+    {
+        m_http = http;
+        m_httpsize = 0;
+        m_read_bytes = 0;
+    }
+
     size_t GetSize() const { return m_httpsize; }
     virtual ~wxHTTPStream(void) { m_http->Abort(); }
 
     size_t GetSize() const { return m_httpsize; }
     virtual ~wxHTTPStream(void) { m_http->Abort(); }