Commit b41dba7d authored by Chen Bill's avatar Chen Bill

fix Replay::ReadName

parent 4ea5df3a
...@@ -208,13 +208,13 @@ bool Replay::ReadNextResponse(unsigned char resp[]) { ...@@ -208,13 +208,13 @@ bool Replay::ReadNextResponse(unsigned char resp[]) {
return false; return false;
return true; return true;
} }
void Replay::ReadName(wchar_t* data) { bool Replay::ReadName(wchar_t* data) {
uint16_t buffer[20]{}; uint16_t buffer[20]{};
if (!ReadData(buffer, sizeof buffer)) { if (!ReadData(buffer, sizeof buffer)) {
data[0] = 0; return false;
return;
} }
BufferIO::CopyWStr(buffer, data, 20); BufferIO::CopyWStr(buffer, data, 20);
return true;
} }
bool Replay::ReadData(void* data, int length) { bool Replay::ReadData(void* data, int length) {
if(!is_replaying) if(!is_replaying)
......
...@@ -48,7 +48,7 @@ public: ...@@ -48,7 +48,7 @@ public:
static bool DeleteReplay(const wchar_t* name); static bool DeleteReplay(const wchar_t* name);
static bool RenameReplay(const wchar_t* oldname, const wchar_t* newname); static bool RenameReplay(const wchar_t* oldname, const wchar_t* newname);
bool ReadNextResponse(unsigned char resp[]); bool ReadNextResponse(unsigned char resp[]);
void ReadName(wchar_t* data); bool ReadName(wchar_t* data);
//void ReadHeader(ReplayHeader& header); //void ReadHeader(ReplayHeader& header);
bool ReadData(void* data, int length); bool ReadData(void* data, int length);
template<typename T> template<typename T>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment