Skip to content

Commit

Permalink
Add assertion for decreasing the indent
Browse files Browse the repository at this point in the history
Co-authored-by: Théophane Hufschmitt <[email protected]>
  • Loading branch information
9999years and thufschmitt authored Feb 8, 2024
1 parent c0a15fb commit a276519
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libexpr/print.cc
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ class Printer
void decreaseIndent()
{
if (options.prettyPrint()) {
assert(indent.size() >= options.prettyIndent);
indent.resize(indent.size() - options.prettyIndent);
}
}
Expand Down

0 comments on commit a276519

Please sign in to comment.