aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/pugl_win.cpp
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-10-08 01:12:47 +0200
committerDavid Robillard <d@drobilla.net>2014-12-16 18:31:22 -0500
commit78ea9855b9ba3dfe380e277aeb16e060a3622336 (patch)
treed468337fc3de7dc2a2a4c2092dd8fe3208cb88fb /pugl/pugl_win.cpp
parent9c7c762945249d6694f17d0e76a152364c4a0088 (diff)
downloadpugl-78ea9855b9ba3dfe380e277aeb16e060a3622336.tar.gz
pugl-78ea9855b9ba3dfe380e277aeb16e060a3622336.tar.bz2
pugl-78ea9855b9ba3dfe380e277aeb16e060a3622336.zip
Fix Windows window class name.
Conflicts: pugl/pugl_win.cpp
Diffstat (limited to 'pugl/pugl_win.cpp')
-rw-r--r--pugl/pugl_win.cpp3
1 files changed, 2 insertions, 1 deletions
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;