[client,sdl] replace memset with c++ string iteration

This commit is contained in:
akallabeth 2023-07-21 14:22:38 +02:00 committed by akallabeth
parent 830d1e17b6
commit 33d8e8e41b

View File

@ -167,7 +167,10 @@ bool SdlInputWidget::update_input(SDL_Renderer* renderer, SDL_Color fgcolor)
if (!text.empty())
{
if (_flags & SDL_INPUT_MASK)
memset(text.data(), '*', text.length());
{
for (size_t x = 0; x < text.length(); x++)
text[x] = '*';
}
}
return _input.update_text(renderer, text, fgcolor);