Fix CodeQL warning
This commit is contained in:
parent
dfe41217f8
commit
fc175732e1
@ -75,7 +75,7 @@ serialize(const EncodingData *data, char *output, const char csi_trailer) {
|
||||
int pos = 0;
|
||||
bool second_field_not_empty = data->has_mods || data->add_actions;
|
||||
bool third_field_not_empty = data->add_text;
|
||||
#define P(fmt, ...) pos += snprintf(output + pos, KEY_BUFFER_SIZE - 2 - pos, fmt, __VA_ARGS__)
|
||||
#define P(fmt, ...) pos += snprintf(output + pos, KEY_BUFFER_SIZE - 2 <= pos ? 0 : KEY_BUFFER_SIZE - 2 - pos, fmt, __VA_ARGS__)
|
||||
P("\x1b%s", "[");
|
||||
if (data->key != 1 || data->add_alternates || second_field_not_empty || third_field_not_empty) P("%u", data->key);
|
||||
if (data->add_alternates) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user