Commit e1a3c64
Fix asserts in Value::setComment (#1445)
The existing asserts seem to not be what was intended; they appear to have been mistranslated in pull/877.
The first assert for `comment.empty()` was previously a check that a provided `const char*` parameter was not null. The function this replaced accepted empty strings, and the if() statement at the start of this function handles them.
The second assert for `comment[0] == '\0'` was written when `comment` was a `const char*`, and was testing for empty c-string input. This PR replaces it with `comment.empty()` to match the original intent.
Co-authored-by: Jordan Bayles <[email protected]>1 parent 3c2205c commit e1a3c64
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1410 | 1410 | | |
1411 | 1411 | | |
1412 | 1412 | | |
1413 | | - | |
1414 | 1413 | | |
1415 | | - | |
| 1414 | + | |
1416 | 1415 | | |
1417 | 1416 | | |
1418 | 1417 | | |
| |||
0 commit comments