MCPcopy Create free account
hub / github.com/ddnet/ddnet / GetRaw

Method GetRaw

src/engine/shared/packer.cpp:205–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205const unsigned char *CUnpacker::GetRaw(int Size)
206{
207 const unsigned char *pPtr = m_pCurrent;
208 if(m_Error)
209 return nullptr;
210
211 // check for nasty sizes
212 if(Size < 0 || m_pCurrent + Size > m_pEnd)
213 {
214 m_Error = true;
215 return nullptr;
216 }
217
218 // "unpack" the data
219 m_pCurrent += Size;
220 return pPtr;
221}

Callers 4

ProcessServerPacketMethod · 0.80
UnpackUuidMethod · 0.80
OnPacketMethod · 0.80
ProcessClientPacketMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected