Skip to content

Commit 58662a1

Browse files
committed
do not read header via stream
1 parent d3e465b commit 58662a1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

simplecpp.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -3522,7 +3522,8 @@ void simplecpp::preprocess(simplecpp::TokenList &output, const simplecpp::TokenL
35223522
std::ifstream f;
35233523
header2 = openHeader(f, dui, rawtok->location.file(), header, systemheader);
35243524
if (f.is_open()) {
3525-
TokenList * const tokens = new TokenList(f, files, header2, outputList);
3525+
f.close();
3526+
TokenList * const tokens = new TokenList(header2, files, outputList);
35263527
if (dui.removeComments)
35273528
tokens->removeComments();
35283529
filedata[header2] = tokens;

0 commit comments

Comments
 (0)