This commit is contained in:
ocornut
2025-09-12 14:35:39 +02:00
parent 8a94422246
commit 2f3e85bc37
2 changed files with 2 additions and 2 deletions

View File

@@ -2066,7 +2066,7 @@ void ImStrncpy(char* dst, const char* src, size_t count)
if (count < 1)
return;
if (count > 1)
strncpy(dst, src, count - 1);
strncpy(dst, src, count - 1); // FIXME-OPT: strncpy not only doesn't guarantee 0-termination, it also always writes the whole array
dst[count - 1] = 0;
}