preproc: Fix SIGSEGV if not data provided for implicit pasting

https://bugzilla.nasm.us/show_bug.cgi?id=3392423

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Cyrill Gorcunov 2017-10-22 21:26:36 +03:00
parent 7524cfd914
commit 6f8109ebf1

View File

@ -3848,8 +3848,8 @@ static bool paste_tokens(Token **head, const struct tokseq_match *m,
next = next->next;
}
/* No match */
if (tok == next)
/* No match or no text to process */
if (tok == next || len == 0)
break;
len += strlen(tok->text);