From a64b71feea3709de719fd2e7d2b65808ec64cd6a Mon Sep 17 00:00:00 2001 From: Ilya Orlov Date: Wed, 17 Oct 2018 00:23:28 +0300 Subject: [PATCH] xrGame: implement linux strncat_s() --- src/Common/PlatformLinux.inl | 1 + src/xrGame/ui/UITalkWnd.cpp | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Common/PlatformLinux.inl b/src/Common/PlatformLinux.inl index 003d4322277..6dba9c0cace 100644 --- a/src/Common/PlatformLinux.inl +++ b/src/Common/PlatformLinux.inl @@ -312,6 +312,7 @@ inline bool strncpy_s(char * dest, const char * source, size_t num) { inline int strcpy_s(char *dest, const char *source) { return (int)(NULL == strcpy(dest, source)); } inline int strcpy_s(char *dest, size_t num, const char *source) { return (int)(NULL == strcpy(dest, source)); } inline int strcat_s(char * dest, size_t size, const char * source) { return (NULL == strcat(dest, source)); } +inline int strncat_s(char * dest, size_t size, const char * source, size_t count) { return (NULL == strncat(dest, source, count)); } #define _vsnprintf vsnprintf #define vsprintf_s(dest, size, format, args) vsprintf(dest, format, args) diff --git a/src/xrGame/ui/UITalkWnd.cpp b/src/xrGame/ui/UITalkWnd.cpp index 985f94a48a1..e975a78fcea 100644 --- a/src/xrGame/ui/UITalkWnd.cpp +++ b/src/xrGame/ui/UITalkWnd.cpp @@ -383,10 +383,8 @@ void CUITalkWnd::PlaySnd(LPCSTR text) } strncpy_s(fn, sizeof(fn), path, xr_strlen(path)); -#ifndef LINUX // FIXME!!! strncat_s(fn, sizeof(fn), text, text_len); strncat_s(fn, sizeof(fn), ext, xr_strlen(ext)); -#endif // strconcat( sizeof(fn), fn, "characters_voice" DELIMITER "dialogs" DELIMITER, text2, ".ogg" );