MCPcopy Create free account
hub / github.com/ZDoom/Raze / copystring

Function copystring

source/common/utility/cmdlib.cpp:112–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110//==========================================================================
111
112char *copystring (const char *s)
113{
114 char *b;
115 if (s)
116 {
117 size_t len = strlen (s) + 1;
118 b = new char[len];
119 memcpy (b, s, len);
120 }
121 else
122 {
123 b = new char[1];
124 b[0] = '\0';
125 }
126 return b;
127}
128
129/*
130=============================================================================

Callers 4

ReadStringFunction · 0.85
SetGenericRepMethod · 0.85
CCMDFunction · 0.85
S_ReadReverbDefFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected