mirror of
https://github.com/tmux/tmux.git
synced 2025-01-08 08:58:47 +00:00
Don't accept zero titles.
This commit is contained in:
parent
228ec26d10
commit
635edfa7d5
8
input.c
8
input.c
@ -1,4 +1,4 @@
|
|||||||
/* $Id: input.c,v 1.2 2007-08-27 08:12:23 nicm Exp $ */
|
/* $Id: input.c,v 1.3 2007-08-27 11:05:21 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -438,8 +438,10 @@ input_pair_control(u_char **buf, size_t *len,
|
|||||||
if (**buf == ';' && (ch == '0' || ch == '1')) {
|
if (**buf == ';' && (ch == '0' || ch == '1')) {
|
||||||
log_debug("title found, length %zu bytes: %.*s",
|
log_debug("title found, length %zu bytes: %.*s",
|
||||||
size - 1, (int) size - 1, *buf + 1);
|
size - 1, (int) size - 1, *buf + 1);
|
||||||
input_store_one(b, CODE_TITLE, size - 1);
|
if (size > 1) {
|
||||||
buffer_write(b, *buf + 1, size - 1);
|
input_store_one(b, CODE_TITLE, size - 1);
|
||||||
|
buffer_write(b, *buf + 1, size - 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Skip the title; add one for the \007. */
|
/* Skip the title; add one for the \007. */
|
||||||
|
4
tmux.h
4
tmux.h
@ -1,4 +1,4 @@
|
|||||||
/* $Id: tmux.h,v 1.2 2007-07-25 23:13:18 nicm Exp $ */
|
/* $Id: tmux.h,v 1.3 2007-08-27 11:05:21 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -36,7 +36,7 @@ extern char *__progname;
|
|||||||
|
|
||||||
/* Fatal errors. */
|
/* Fatal errors. */
|
||||||
#define fatal(msg) log_fatal("%s: %s", __func__, msg);
|
#define fatal(msg) log_fatal("%s: %s", __func__, msg);
|
||||||
#define fatalx(msg) log_fatal("%s: %s", __func__, msg);
|
#define fatalx(msg) log_fatalx("%s: %s", __func__, msg);
|
||||||
|
|
||||||
/* Definition to shut gcc up about unused arguments. */
|
/* Definition to shut gcc up about unused arguments. */
|
||||||
#define unused __attribute__ ((unused))
|
#define unused __attribute__ ((unused))
|
||||||
|
Loading…
Reference in New Issue
Block a user