diff options
| author | Martin Hořeňovský | 2021-11-04 00:22:50 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2021-11-04 00:23:56 +0100 |
| commit | 912df7df354fd6c814b5d7c45ac44f494a5fb5fe (patch) | |
| tree | 04cc730476213dde1b17aede165cb9ffef62690f /tests/SelfTest/IntrospectiveTests/TextFlow.tests.cpp | |
| parent | 931f41b4d62bb572216c958899258e6d0b592f25 (diff) | |
| download | catch3-912df7df354fd6c814b5d7c45ac44f494a5fb5fe.tar.gz | |
Fix quadratic runtime when linebreaking strings without newlines
The problem was that every line would iterate from current line
start position to the end of the string, looking for a newline
to break on, leading to accidentally quadratic runtime. With this
change, the code only ever searches up to the current line's
length and not more.
Credit to @jorgenpt for the fix suggestion.
Closes #2315
Diffstat (limited to 'tests/SelfTest/IntrospectiveTests/TextFlow.tests.cpp')
0 files changed, 0 insertions, 0 deletions