From 78ea9855b9ba3dfe380e277aeb16e060a3622336 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 8 Oct 2014 01:12:47 +0200 Subject: Fix Windows window class name. Conflicts: pugl/pugl_win.cpp --- pugl/pugl_win.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pugl/pugl_win.cpp b/pugl/pugl_win.cpp index 8ac879e..9441549 100644 --- a/pugl/pugl_win.cpp +++ b/pugl/pugl_win.cpp @@ -114,7 +114,8 @@ puglCreateWindow(PuglView* view, const char* title) // Should class be a parameter? Does this make sense on other platforms? static int wc_count = 0; char classNameBuf[256]; - _snprintf(classNameBuf, sizeof(classNameBuf), "%s_%d\n", title, wc_count++); + _snprintf(classNameBuf, sizeof(classNameBuf), "%s_%d", title, wc_count++); + classNameBuf[sizeof(classNameBuf) - 1] = '\0'; impl->wc.style = CS_OWNDC; impl->wc.lpfnWndProc = wndProc; -- cgit v1.2.3