Cleanup native NetworkMessage write and read string char size
This commit is contained in:
@@ -187,7 +187,7 @@ public:
|
||||
FORCE_INLINE void WriteString(const String& value)
|
||||
{
|
||||
WriteUInt16(value.Length()); // TODO: Use 1-byte length when possible
|
||||
WriteBytes((uint8*)value.Get(), value.Length() * sizeof(wchar_t));
|
||||
WriteBytes((uint8*)value.Get(), value.Length() * sizeof(Char));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -198,7 +198,7 @@ public:
|
||||
uint16 length = ReadUInt16();
|
||||
String value;
|
||||
value.Resize(length);
|
||||
ReadBytes((uint8*)value.Get(), length * sizeof(wchar_t));
|
||||
ReadBytes((uint8*)value.Get(), length * sizeof(Char));
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user