1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:57:44 +00:00

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

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();