MCPcopy Create free account
hub / github.com/diasurgical/devilution / StringCopy

Function StringCopy

3rdParty/StormLib/src/SBaseCommon.cpp:98–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96// Safe string functions (for ANSI builds)
97
98void StringCopy(char * szTarget, size_t cchTarget, const char * szSource)
99{
100 if(cchTarget > 0)
101 {
102 size_t cchSource = strlen(szSource);
103
104 if(cchSource >= cchTarget)
105 cchSource = cchTarget - 1;
106
107 memcpy(szTarget, szSource, cchSource);
108 szTarget[cchSource] = 0;
109 }
110}
111
112void StringCat(char * szTarget, size_t cchTargetMax, const char * szSource)
113{

Callers 5

OpenLocalFileFunction · 0.85
SFileGetFileNameFunction · 0.85
FindPatchEntryFunction · 0.85
DoMPQSearch_FileEntryFunction · 0.85
StringCatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected