fix(builder): Sub-string check

Fixes #282
This commit is contained in:
Michael Carlberg 2016-12-30 20:34:13 +01:00
parent 18cf9df86c
commit dffdc6a20b
1 changed files with 1 additions and 1 deletions

View File

@ -313,7 +313,7 @@ void builder::space() {
void builder::remove_trailing_space(size_t len) {
if (len == 0_z || len > m_output.size()) {
return;
} else if (string(m_output.rbegin() + len, m_output.rbegin()) == string(len, ' ')) {
} else if (m_output.substr(m_output.size() - len) == string(len, ' ')) {
m_output.erase(m_output.size() - len);
}
}