MCPcopy Create free account
hub / github.com/AlSch092/UltimateAntiCheat / ReadZeroTerminatedString

Function ReadZeroTerminatedString

Server/Network/PacketReader.cs:207–229  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

205 }
206
207 public string ReadZeroTerminatedString()
208 {
209 char[] str = new char[255];
210
211 bool reading = true;
212 int count = 0;
213
214 while (reading)
215 {
216 char bChar = (char)ReadByte();
217 if (bChar != 0)
218 {
219 str[count] = bChar;
220 count++;
221 }
222 else if (bChar == 0)
223 {
224 return new string(str);
225 }
226 }
227
228 return new string(str);
229 }
230
231 public string ReadString(int count)
232 {

Callers

nothing calls this directly

Calls 1

ReadByteFunction · 0.85

Tested by

no test coverage detected