Fixed Serializer::ReadStr.
This commit is contained in:
parent
b1adf15f89
commit
7cdd57cc5f
@ -1071,7 +1071,9 @@ namespace ehs
|
||||
template<typename T, typename O>
|
||||
Str<T, O> ReadStr(O size = 0)
|
||||
{
|
||||
if (!size)
|
||||
bool sizeKnown = size;
|
||||
|
||||
if (!sizeKnown)
|
||||
while (&data[offset + sizeof(T) * size])
|
||||
size++;
|
||||
|
||||
@ -1096,7 +1098,10 @@ namespace ehs
|
||||
Util::Copy(&result[0], &data[offset], result.Size(true));
|
||||
}
|
||||
|
||||
offset += result.Size(true) + 1;
|
||||
offset += result.Size(true);
|
||||
|
||||
if (!sizeKnown)
|
||||
offset++;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user