Core/PacketIO: Fixed SMSG_DB_REPLY structure

This commit is contained in:
Shauren
2015-02-02 19:50:27 +01:00
parent 68d026709b
commit dd4973ab23
2 changed files with 7 additions and 2 deletions

View File

@@ -80,8 +80,7 @@ void WriteDB2RecordToPacket(DB2Storage<T> const& store, uint32 id, uint32 locale
char const* str = locStr->Str[locale];
size_t len = strlen(str);
buffer << uint16(len);
if (len)
buffer << str;
buffer.WriteString(str, len);
entry += sizeof(char*);
break;
}

View File

@@ -544,6 +544,12 @@ class ByteBuffer
append(str.c_str(), len);
}
void WriteString(char const* str, size_t len)
{
if (len)
append(str, len);
}
uint32 ReadPackedTime()
{
uint32 packedDate = read<uint32>();