Skip to content

Commit

Permalink
Add a 3 arguments overload of strncpy_s
Browse files Browse the repository at this point in the history
  • Loading branch information
Zegeri committed Sep 16, 2018
1 parent 9770522 commit 90d4a1d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Common/PlatformLinux.inl
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,12 @@ typedef dirent DirEntryType;
#define lstrcpy strcpy
#define stricmp strcasecmp
#define strupr SDL_strupr
#define strncpy_s(dest, size, source, num) (NULL == strncpy(dest, source, num))
inline bool strncpy_s(char * dest, size_t, const char * source, size_t num) {
return NULL == strncpy(dest, source, num);
}
inline bool strncpy_s(char * dest, const char * source, size_t num) {
return NULL == strncpy(dest, source, num);
}
#define strcpy_s(dest, num, source) (NULL == strcpy(dest, source))
#define strcat_s(dest, num, source) (dest == strcat(dest, source))
#define _vsnprintf vsnprintf
Expand Down

0 comments on commit 90d4a1d

Please sign in to comment.