MCPcopy Create free account
hub / github.com/amule-project/amule / ReadString

Method ReadString

src/SafeFile.cpp:215–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213
214
215wxString CFileDataIO::ReadString(bool bOptUTF8, uint8 SizeLen, bool SafeRead) const
216{
217 uint32 readLen;
218 switch (SizeLen) {
219 case sizeof(uint16): readLen = ReadUInt16(); break;
220 case sizeof(uint32): readLen = ReadUInt32(); break;
221
222 default:
223 MULE_VALIDATE_PARAMS(false, "Invalid SizeLen value in ReadString");
224 }
225
226 if (SafeRead) {
227 readLen = std::min<uint64>(readLen, GetLength() - GetPosition());
228 }
229
230 return ReadOnlyString(bOptUTF8, readLen);
231}
232
233
234wxString CFileDataIO::ReadOnlyString(bool bOptUTF8, uint16 raw_len) const

Callers 9

ProcessFileInfoMethod · 0.45
ProcessPacketMethod · 0.45
CTagMethod · 0.45
ProcessPacketMethod · 0.45
DecodeKeyIndexDatFunction · 0.45
runMethod · 0.45

Calls

no outgoing calls

Tested by 1

runMethod · 0.36