aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--parse-events.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/parse-events.c b/parse-events.c
index 082fe3b..d95dda4 100644
--- a/parse-events.c
+++ b/parse-events.c
@@ -834,6 +834,7 @@ static enum event_type __read_token(char **tok)
834 i--; 834 i--;
835 quote_ch = ch; 835 quote_ch = ch;
836 last_ch = 0; 836 last_ch = 0;
837 concat:
837 do { 838 do {
838 if (i == (BUFSIZ - 1)) { 839 if (i == (BUFSIZ - 1)) {
839 buf[i] = 0; 840 buf[i] = 0;
@@ -859,6 +860,22 @@ static enum event_type __read_token(char **tok)
859 } while (ch != quote_ch || last_ch == '\\'); 860 } while (ch != quote_ch || last_ch == '\\');
860 /* remove the last quote */ 861 /* remove the last quote */
861 i--; 862 i--;
863
864 /*
865 * For strings (double quotes) check the next token.
866 * If it is another string, concatinate the two.
867 */
868 if (type == EVENT_DQUOTE) {
869 unsigned long long save_input_buf_ptr = input_buf_ptr;
870
871 do {
872 ch = __read_char();
873 } while (isspace(ch));
874 if (ch == '"')
875 goto concat;
876 input_buf_ptr = save_input_buf_ptr;
877 }
878
862 goto out; 879 goto out;
863 880
864 case EVENT_ERROR ... EVENT_SPACE: 881 case EVENT_ERROR ... EVENT_SPACE: