diff options
Diffstat (limited to 'examples/support/ini.c')
-rw-r--r-- | examples/support/ini.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/support/ini.c b/examples/support/ini.c index 6be9c44a..6bc1eae6 100644 --- a/examples/support/ini.c +++ b/examples/support/ini.c @@ -64,7 +64,7 @@ static char* find_chars_or_comment(const char* s, const char* chars) /* Version of strncpy that ensures dest (size bytes) is null-terminated. */ static char* strncpy0(char* dest, const char* src, size_t size) { - strncpy(dest, src, size); + strncpy(dest, src, size-1); dest[size - 1] = '\0'; return dest; } |