MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / strCopyAndZero

Function strCopyAndZero

TheForceEngine/TFE_DarkForces/util.cpp:28–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26 }
27
28 char* strCopyAndZero(char* dst, const char* src, s32 bufferSize)
29 {
30 char* dstPtr = dst;
31 while (bufferSize > 0)
32 {
33 char ch = *src;
34 if (ch == 0) { break; }
35 bufferSize--;
36 *dst = ch;
37
38 src++;
39 dst++;
40 }
41 while (bufferSize)
42 {
43 bufferSize--;
44 *dst = 0;
45 dst++;
46 }
47 return dstPtr;
48 }
49
50 s32 strToInt(const char* param)
51 {

Callers 3

hud_sendTextMessageFunction · 0.85
agent_createNewAgentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected