diff options
author | fujiwarat <takao.fujiwara1@gmail.com> | 2019-01-11 12:56:42 +0900 |
---|---|---|
committer | fujiwarat <takao.fujiwara1@gmail.com> | 2019-01-11 12:56:42 +0900 |
commit | 0f5084e07c215d74adc4eeeda40b374855cce59a (patch) | |
tree | d0d4615821b2d094e9b5143d6ea017d53ce5640c | |
parent | be7fb813e530442897a9f9130b8a26380e5a12a1 (diff) | |
download | ibus-0f5084e07c215d74adc4eeeda40b374855cce59a.tar.gz |
src/ibuscomposetable: Replace assert with warning for .XCompose
BUG=rhbz#1470673
-rw-r--r-- | src/ibuscomposetable.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/ibuscomposetable.c b/src/ibuscomposetable.c index b843e7e1..1c0ece41 100644 --- a/src/ibuscomposetable.c +++ b/src/ibuscomposetable.c @@ -1,7 +1,7 @@ /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* ibus - The Input Bus * Copyright (C) 2013-2014 Peng Huang <shawn.p.huang@gmail.com> - * Copyright (C) 2013-2018 Takao Fujiwara <takao.fujiwara1@gmail.com> + * Copyright (C) 2013-2019 Takao Fujiwara <takao.fujiwara1@gmail.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -98,14 +98,16 @@ parse_compose_value (IBusComposeData *compose_data, uch = words[1][1]; /* The escaped string "\"" is separated with '\\' and '"'. */ - if (uch == '\0' && words[2][0] == '"') + if (uch == '\0' && words[2][0] == '"') { uch = '"'; /* The escaped octal */ - else if (uch >= '0' && uch <= '8') + } else if (uch >= '0' && uch <= '8') { uch = g_ascii_strtoll(words[1] + 1, NULL, 8); /* If we need to handle other escape sequences. */ - else if (uch != '\\') - g_assert_not_reached (); + } else if (uch != '\\') { + g_warning ("Invalid backslash: %s: %s", val, line); + goto fail; + } } if (g_utf8_get_char (g_utf8_next_char (words[1])) > 0) { |