diff options
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r-- | source/blender/windowmanager/intern/wm.c | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c index 426069245c3..76b5762fa4e 100644 --- a/source/blender/windowmanager/intern/wm.c +++ b/source/blender/windowmanager/intern/wm.c @@ -275,7 +275,7 @@ void wm_add_default(bContext *C) win= wm_window_new(C); win->screen= screen; screen->winid= win->winid; - BLI_strncpy(win->screenname, screen->id.name+2, 21); + BLI_strncpy(win->screenname, screen->id.name+2, sizeof(win->screenname)); wm->winactive= win; wm->file_saved= 1; diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index aa99e8fcb1c..ca37f0db61b 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -195,7 +195,7 @@ static void wm_window_match_do(bContext *C, ListBase *oldwmlist) else win->screen= ED_screen_duplicate(win, screen); - BLI_strncpy(win->screenname, win->screen->id.name+2, 21); + BLI_strncpy(win->screenname, win->screen->id.name+2, sizeof(win->screenname)); win->screen->winid= win->winid; } } diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index bbbe49ce3dd..35a3fbcf9fb 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -216,7 +216,7 @@ wmWindow *wm_window_copy(bContext *C, wmWindow *winorig) /* duplicate assigns to window */ win->screen= ED_screen_duplicate(win, winorig->screen); - BLI_strncpy(win->screenname, win->screen->id.name+2, 21); + BLI_strncpy(win->screenname, win->screen->id.name+2, sizeof(win->screenname)); win->screen->winid= win->winid; win->screen->do_refresh= 1; |