Skip to content

Commit a64b71f

Browse files
committed
xrGame: implement linux strncat_s()
1 parent da8fdce commit a64b71f

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/Common/PlatformLinux.inl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ inline bool strncpy_s(char * dest, const char * source, size_t num) {
312312
inline int strcpy_s(char *dest, const char *source) { return (int)(NULL == strcpy(dest, source)); }
313313
inline int strcpy_s(char *dest, size_t num, const char *source) { return (int)(NULL == strcpy(dest, source)); }
314314
inline int strcat_s(char * dest, size_t size, const char * source) { return (NULL == strcat(dest, source)); }
315+
inline int strncat_s(char * dest, size_t size, const char * source, size_t count) { return (NULL == strncat(dest, source, count)); }
315316

316317
#define _vsnprintf vsnprintf
317318
#define vsprintf_s(dest, size, format, args) vsprintf(dest, format, args)

src/xrGame/ui/UITalkWnd.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,10 +383,8 @@ void CUITalkWnd::PlaySnd(LPCSTR text)
383383
}
384384

385385
strncpy_s(fn, sizeof(fn), path, xr_strlen(path));
386-
#ifndef LINUX // FIXME!!!
387386
strncat_s(fn, sizeof(fn), text, text_len);
388387
strncat_s(fn, sizeof(fn), ext, xr_strlen(ext));
389-
#endif
390388

391389
// strconcat( sizeof(fn), fn, "characters_voice" DELIMITER "dialogs" DELIMITER, text2, ".ogg" );
392390

0 commit comments

Comments
 (0)