MCPcopy Create free account
hub / github.com/cuberite/cuberite / MyStrCpy

Function MyStrCpy

src/StackWalker.cpp:234–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232#endif
233
234static void MyStrCpy(char* szDest, size_t nMaxDestSize, const char* szSrc)
235{
236 if (nMaxDestSize <= 0) return;
237 if (strlen(szSrc) < nMaxDestSize)
238 {
239 strcpy_s(szDest, nMaxDestSize, szSrc);
240 }
241 else
242 {
243 strncpy_s(szDest, nMaxDestSize, szSrc, nMaxDestSize);
244 szDest[nMaxDestSize-1] = 0;
245 }
246} // MyStrCpy
247
248// Normally it should be enough to use 'CONTEXT_FULL' (better would be 'CONTEXT_ALL')
249#define USED_CONTEXT_FLAGS CONTEXT_FULL

Callers 2

ShowCallstackMethod · 0.85
OnCallstackEntryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected