From 77012aee2edc2c71010c0ef7b1902e329fd157cd Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 13 Jan 2005 16:00:55 +0000 Subject: [PATCH] fix incorrect window title --- pandatool/src/win-stats/winStats.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pandatool/src/win-stats/winStats.cxx b/pandatool/src/win-stats/winStats.cxx index 4e22aefd3a..6f2c9fed57 100644 --- a/pandatool/src/win-stats/winStats.cxx +++ b/pandatool/src/win-stats/winStats.cxx @@ -70,11 +70,12 @@ create_toplevel_window(HINSTANCE application) { DWORD window_style = WS_POPUP | WS_SYSMENU | WS_ICONIC; - char window_name[128]; - sprintf(window_name, "PStats %d", pstats_port); + ostringstream strm; + strm << "PStats " << pstats_port; + string window_name = strm.str(); HWND toplevel_window = - CreateWindow(toplevel_class_name, window_name, window_style, + CreateWindow(toplevel_class_name, window_name.c_str(), window_style, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, application, 0); if (!toplevel_window) {