Skip to content

Commit

Permalink
xrGame: implement linux strncat_s()
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleivg committed Nov 6, 2018
1 parent da8fdce commit a64b71f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions src/Common/PlatformLinux.inl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions src/xrGame/ui/UITalkWnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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" );

Expand Down

0 comments on commit a64b71f

Please sign in to comment.