1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-11 00:04:24 +00:00

Merge branch 'master' into docking

This commit is contained in:
ocornut 2025-09-12 15:05:55 +02:00
commit 8c6096fcfe
7 changed files with 30 additions and 14 deletions

View file

@ -2130,7 +2130,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;
}