LibRegex: VERIFY that string builder in print_header is not null.

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
This commit is contained in:
Andrew Kaster 2021-02-26 18:32:00 -07:00 committed by Andreas Kling
parent 87a47de613
commit dc6485cfcb
Notes: sideshowbarker 2024-07-18 21:50:58 +09:00

View File

@ -129,8 +129,10 @@ public:
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();