Skip to content

Commit

Permalink
Fix crash in table cell processing (#174)
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Thaler <[email protected]>
  • Loading branch information
dthaler authored Apr 20, 2024
1 parent 5835b02 commit 8d7ee7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rst2rfcxml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ rst2rfcxml::output_table_row(ostream& output_stream)
string rst_content = _table_cell_rst[column];
size_t offset = rst_content.find_first_not_of(" ");
string attributes;
if (offset > 0) {
if (offset != std::string::npos && offset > 0) {
rst_content = rst_content.substr(offset);
attributes = "align=\"center\"";
}
Expand Down

0 comments on commit 8d7ee7c

Please sign in to comment.