Skip to content

Commit

Permalink
LibRegex: VERIFY that string builder in print_header is not null.
Browse files Browse the repository at this point in the history
I don't know why g++ thinks this is the case with
ENABLE_ALL_DEBUG_MACROS when building for serenity. Adding an assert to
placate it seems reasonable
  • Loading branch information
ADKaster authored and awesomekling committed Feb 28, 2021
1 parent 87a47de commit dc6485c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Userland/Libraries/LibRegex/RegexDebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ class RegexDebug {
for (size_t i = 0; i < length; ++i) {
builder.append('=');
}
auto str = builder.to_string();
VERIFY(!str.is_empty());

fprintf(m_file, "%s\n", builder.to_string().characters());
fprintf(m_file, "%s\n", str.characters());
fflush(m_file);

builder.clear();
Expand Down

0 comments on commit dc6485c

Please sign in to comment.