summaryrefslogtreecommitdiff
blob: c136539726a3cad59fa9cbcfb480e0606af828c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Bug: http://code.google.com/p/treeviewx/issues/detail?id=1
Description: fix crash on loading tree file.
Author: Tim Booth
--- tv-0.5.orig/tview.cpp
+++ tv-0.5/tview.cpp
@@ -278,7 +278,7 @@
 			char buf[256];
 			strcpy (buf, p->GetLabel().c_str());
 			wchar_t wbuf[256];
-			mbstowcs (wbuf, buf, size_t(wbuf));
+			mbstowcs (wbuf, buf, 256);
 			s << wbuf;
 #else
    			s << p->GetLabel().c_str();
@@ -563,7 +563,7 @@
 		char buf[256];
 		strcpy (buf, t.GetName().c_str());
 		wchar_t wbuf[256];
-		mbstowcs (wbuf, buf, size_t(wbuf));
+		mbstowcs (wbuf, buf, 256);
 		txt << wbuf;
 #else
 		txt << t.GetName().c_str();
@@ -712,7 +712,7 @@
 		char buf[256];
 		strcpy (buf, p.GetIthTreeName(i).c_str());
 		wchar_t wbuf[256];
-		mbstowcs (wbuf, buf, size_t(wbuf));
+		mbstowcs (wbuf, buf, 256);
 
 		std::wstring tname = wbuf;
 
@@ -1046,6 +1046,7 @@
 void MyCanvas::OnSize(wxSizeEvent& event)
 {
 	Resize ();
+    Refresh();
     event.Skip();
 }