Merge branch 'master' into docking

This commit is contained in:
ocornut
2025-09-12 15:05:55 +02:00
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;
}