MCPcopy Index your code
hub / github.com/assaultcube/AC / getstring

Function getstring

source/src/protocol.cpp:137–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135void sendstring(const char *t, vector<uchar> &p) { sendstring_(t, p); }
136
137void getstring(char *text, ucharbuf &p, int len)
138{
139 DEBUGCODE(debugmute = true);
140 char *t = text;
141 do
142 {
143 if(t>=&text[len]) { text[len-1] = 0; return; }
144 if(!p.remaining()) { *t = 0; return; }
145 *t = getint(p);
146 }
147 while(*t++);
148 DEBUGCODE(debugmute = false);
149 DEBUGVAR(text);
150}
151
152template<class T>
153static inline void putip4_(T &p, enet_uint32 ip)

Callers 8

loadMethod · 0.85
parsemessagesFunction · 0.85
loopiFunction · 0.85
receivefileFunction · 0.85
checkpingsFunction · 0.85
processFunction · 0.85
loopvFunction · 0.85
modeinfoFunction · 0.85

Calls 2

getintFunction · 0.85
remainingMethod · 0.45

Tested by

no test coverage detected