mirror of
https://github.com/vale981/bspwm
synced 2025-03-06 10:11:43 -05:00
Fix false positives in keyeq
This commit is contained in:
parent
bfb0c37c90
commit
11ca847bf6
1 changed files with 2 additions and 1 deletions
|
@ -445,7 +445,8 @@ void restore_wm_state(xcb_atom_t *w, jsmntok_t **t, char *json)
|
||||||
|
|
||||||
bool keyeq(char *s, jsmntok_t *key, char *json)
|
bool keyeq(char *s, jsmntok_t *key, char *json)
|
||||||
{
|
{
|
||||||
return (strncmp(s, json + key->start, key->end - key->start) == 0);
|
size_t n = key->end - key->start;
|
||||||
|
return (strlen(s) == n && strncmp(s, json + key->start, n) == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *copy_string(jsmntok_t *tok, char *json)
|
char *copy_string(jsmntok_t *tok, char *json)
|
||||||
|
|
Loading…
Add table
Reference in a new issue