Fixed many invalid uses of StringView::GetText(), where a null-terminated string was required.

Renamed GetText() to GetNonTerminatedText() to reduce chance of same bugs appearing in the future.
This commit is contained in:
Zbigniew Skowron
2021-08-08 22:04:54 +02:00
parent 6ac0d5d3f4
commit aecc81f5e5
14 changed files with 158 additions and 108 deletions

View File

@@ -35,7 +35,7 @@ void RunUWP()
DialogResult MessageBox::Show(Window* parent, const StringView& text, const StringView& caption, MessageBoxButtons buttons, MessageBoxIcon icon)
{
return (DialogResult)CUWPPlatform->ShowMessageDialog(parent ? parent->GetImpl() : nullptr, text.GetText(), caption.GetText(), (UWPPlatformImpl::MessageBoxButtons)buttons, (UWPPlatformImpl::MessageBoxIcon)icon);
return (DialogResult)CUWPPlatform->ShowMessageDialog(parent ? parent->GetImpl() : nullptr, String(text).GetText(), String(caption).GetText(), (UWPPlatformImpl::MessageBoxButtons)buttons, (UWPPlatformImpl::MessageBoxIcon)icon);
}
bool UWPPlatform::Init()