Error in parser @-macro is fixed: macro in end of line are ignored before this fix. Thanks Max Vasilyev 2:5057/77

This commit is contained in:
Stas Degteff
2011-02-11 20:13:47 +00:00
parent d6cc923213
commit f842f826fb
3 changed files with 7 additions and 1 deletions

View File

@@ -50,7 +50,7 @@ static bool tokenxchg(std::string &input, std::string::iterator &pos,
size_t toklen = strlen(tok);
const char* inp_str_tok=it2str(input, pos);
if ( (strnieql(inp_str_tok, tok, toklen)) && (isspace(inp_str_tok[toklen]) || ispunct(inp_str_tok[toklen])) )
if ( (strnieql(inp_str_tok, tok, toklen)) && (isspace(inp_str_tok[toklen]) || ispunct(inp_str_tok[toklen]) || inp_str_tok[toklen]=='\0') )
{
std::string str = src;
std::string::iterator tokend = pos+toklen;