Skip to content

Commit 77012ae

Browse files
committed
fix incorrect window title
1 parent 7e526ea commit 77012ae

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pandatool/src/win-stats/winStats.cxx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,12 @@ create_toplevel_window(HINSTANCE application) {
7070

7171
DWORD window_style = WS_POPUP | WS_SYSMENU | WS_ICONIC;
7272

73-
char window_name[128];
74-
sprintf(window_name, "PStats %d", pstats_port);
73+
ostringstream strm;
74+
strm << "PStats " << pstats_port;
75+
string window_name = strm.str();
7576

7677
HWND toplevel_window =
77-
CreateWindow(toplevel_class_name, window_name, window_style,
78+
CreateWindow(toplevel_class_name, window_name.c_str(), window_style,
7879
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
7980
NULL, NULL, application, 0);
8081
if (!toplevel_window) {

0 commit comments

Comments
 (0)