Skip to content

Commit 2bdbf3f

Browse files
committed
elf2rel: Fix comment handling
1 parent 2bdbc77 commit 2bdbf3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ttyd-tools/elf2rel/elf2rel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ std::map<std::string, uint32_t> loadSymbolMap(const std::string &filename)
2020
boost::trim_left(line);
2121

2222
// Ignore comments
23-
if (line.find_first_of("//") == line.npos)
23+
if (line.size() == 0 || line.find_first_of("//") == 0)
2424
{
2525
continue;
2626
}

0 commit comments

Comments
 (0)