--- src/cppcomp.h.orig 2024-03-26 11:37:17.000000000 -0500 +++ src/cppcomp.h 2024-04-02 22:42:50.000000000 -0500 @@ -247,7 +247,7 @@ static inline void strncpy_s(char * de, size_t de_size, const char * so, size_t count) { const size_t sourcelen = so ? strlen(so) : 0; size_t tobecopied = sourcelen < count ? sourcelen : count; - if ( tobecopied < de_size ) { + if ( tobecopied <= de_size ) { while (so && *so && (tobecopied > 0) ) { *de = *so; ++de; ++so; --tobecopied; } // does not copy final 0