mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-13 00:24:20 +00:00
Comments
This commit is contained in:
parent
8a94422246
commit
2f3e85bc37
2 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue