Skip to content

Commit e56a09a

Browse files
committed
fixes
1 parent ce06610 commit e56a09a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

simplecpp.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2265,10 +2265,12 @@ namespace simplecpp {
22652265
argTok = argTok->next;
22662266
if (!sameline(tok, argTok))
22672267
break;
2268-
if (argTok && argTok->str() == "#") {
2268+
if (argTok->str() == "#") {
22692269
if (!argTok->next || argTok->next->str() != "#")
22702270
throw Error(argTok->location, "Expected '#'");
22712271
argTok = argTok->next->next;
2272+
if (!sameline(tok, argTok) || !argTok->name)
2273+
throw Error(argTok->location, "Expected name");
22722274
} else {
22732275
break;
22742276
}

0 commit comments

Comments
 (0)