Signed-off-by: Shamus Hammons <jlhamm@acm.org>
if (dst >= edst)
goto overflow;
+ // Skip comments in case a loose @ or \ is in there
+ // In that case the tokeniser was trying to expand it.
+ if (*s == '*' || *s == ';' || ((*s == '/') && (*(s + 1) == '/')))
+ goto skipcomments;
+
*dst++ = *s++;
}
// Do macro expansion
}
}
+skipcomments:
+
*dst = EOS;
DEBUG { printf("ExM: dst=\"%s\"\n", dest); }
return OK;