mirror of
https://github.com/tmux/tmux.git
synced 2026-10-07 01:55:49 +00:00
Fix uninitialized var for sscanf %n.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: layout-custom.c,v 1.37 2026/07/10 13:38:45 nicm Exp $ */
|
/* $OpenBSD: layout-custom.c,v 1.38 2026/07/16 12:36:58 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2010 Nicholas Marriott <nicholas.marriott@gmail.com>
|
* Copyright (c) 2010 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||||
@@ -177,7 +177,7 @@ layout_parse(struct window *w, const char *layout, char **cause)
|
|||||||
struct window_pane *wp;
|
struct window_pane *wp;
|
||||||
u_int npanes, ncells, sx = 0, sy = 0;
|
u_int npanes, ncells, sx = 0, sy = 0;
|
||||||
u_short csum;
|
u_short csum;
|
||||||
int n;
|
int n = 0;
|
||||||
|
|
||||||
/* Check validity. */
|
/* Check validity. */
|
||||||
if (sscanf(layout, "%hx,%n", &csum, &n) != 1 || n != 5) {
|
if (sscanf(layout, "%hx,%n", &csum, &n) != 1 || n != 5) {
|
||||||
|
|||||||
Reference in New Issue
Block a user