| 2152 | } |
| 2153 | |
| 2154 | void ImStrncpy(char* dst, const char* src, size_t count) |
| 2155 | { |
| 2156 | if (count < 1) |
| 2157 | return; |
| 2158 | if (count > 1) |
| 2159 | strncpy(dst, src, count - 1); // FIXME-OPT: strncpy not only doesn't guarantee 0-termination, it also always writes the whole array |
| 2160 | dst[count - 1] = 0; |
| 2161 | } |
| 2162 | |
| 2163 | char* ImStrdup(const char* str) |
| 2164 | { |
no test coverage detected