UIEdit: set char to 0 instead of NULL

This commit is contained in:
Louis Gombert 2024-04-18 19:14:25 +02:00
parent 6572274883
commit 47f0f6e443

View File

@ -199,7 +199,7 @@ void UIEdit::SetText(char *text) {
void UIEdit::GetText(char *buffer, int len) {
// ASSERT(strlen(m_TextBuf) < (unsigned)len);
if (!m_TextBuf) {
buffer[0] = NULL;
buffer[0] = 0;
return;
}
strncpy(buffer, m_TextBuf, len - 1);