ImStrncpy: Fixed -Wstringop-truncation warning on GCC8 (#2323)

diff --git a/imgui.cpp b/imgui.cpp
index 8d85935..4fd20a9 100644
--- a/imgui.cpp
+++ b/imgui.cpp
@@ -1295,7 +1295,8 @@
 void ImStrncpy(char* dst, const char* src, size_t count)
 {
     if (count < 1) return;
-    strncpy(dst, src, count);
+    if (count > 1)
+      strncpy(dst, src, count-1);
     dst[count-1] = 0;
 }