1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Fix UB for empty string_views

This commit is contained in:
mrmbernardi
2025-11-15 23:50:20 +11:00
committed by GitHub
parent f454ff5f6e
commit a7b962db5f

View File

@@ -671,7 +671,10 @@ namespace OpenRCT2
{
len = s.size();
}
_buffer.Write(s.data(), len);
if (len > 0)
{
_buffer.Write(s.data(), len);
}
_buffer.Write(&nullt, sizeof(nullt));
}