There was an error while loading. Please reload this page.
1 parent ce06610 commit e56a09aCopy full SHA for e56a09a
1 file changed
simplecpp.cpp
@@ -2265,10 +2265,12 @@ namespace simplecpp {
2265
argTok = argTok->next;
2266
if (!sameline(tok, argTok))
2267
break;
2268
- if (argTok && argTok->str() == "#") {
+ if (argTok->str() == "#") {
2269
if (!argTok->next || argTok->next->str() != "#")
2270
throw Error(argTok->location, "Expected '#'");
2271
argTok = argTok->next->next;
2272
+ if (!sameline(tok, argTok) || !argTok->name)
2273
+ throw Error(argTok->location, "Expected name");
2274
} else {
2275
2276
}
0 commit comments