diff options
author | Ran Benita <ran234@gmail.com> | 2014-10-13 18:51:12 +0300 |
---|---|---|
committer | Ran Benita <ran234@gmail.com> | 2014-10-13 18:54:52 +0300 |
commit | a3116f97d09a6d6b521dbb543f8f20b33032aa68 (patch) | |
tree | 7559424b13bf3324b1a0d65acdf756deb0043f5e /src/scanner-utils.h | |
parent | 65c355aa7aca77178fb9153821cc4d08b78cfa64 (diff) | |
download | xorg-lib-libxkbcommon-a3116f97d09a6d6b521dbb543f8f20b33032aa68.tar.gz |
compose/parser: fix segfault when including
The keysym cache for the new scanner was not initialized.
To avoid such errors also in the future, require passing the priv
argument in scanner_init(), instead of initializing it separately.
Signed-off-by: Ran Benita <ran234@gmail.com>
Diffstat (limited to 'src/scanner-utils.h')
-rw-r--r-- | src/scanner-utils.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/scanner-utils.h b/src/scanner-utils.h index 914e11f..b60a100 100644 --- a/src/scanner-utils.h +++ b/src/scanner-utils.h @@ -71,7 +71,8 @@ struct scanner { static inline void scanner_init(struct scanner *s, struct xkb_context *ctx, - const char *string, size_t len, const char *file_name) + const char *string, size_t len, const char *file_name, + void *priv) { s->s = string; s->len = len; @@ -80,6 +81,7 @@ scanner_init(struct scanner *s, struct xkb_context *ctx, s->token_line = s->token_column = 1; s->file_name = file_name; s->ctx = ctx; + s->priv = priv; } static inline char |