1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-13 00:24:20 +00:00
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;
}