| 30 | #include "Engine/Scripting/ManagedCLR/MUtils.h" |
| 31 | |
| 32 | void ReadStream::Read(StringAnsi& data) |
| 33 | { |
| 34 | int32 length; |
| 35 | ReadInt32(&length); |
| 36 | if (length < 0 || length > STREAM_MAX_STRING_LENGTH) |
| 37 | { |
| 38 | _hasError = true; |
| 39 | data = ""; |
| 40 | return; |
| 41 | } |
| 42 | |
| 43 | data.ReserveSpace(length); |
| 44 | if (length == 0) |
| 45 | return; |
| 46 | char* ptr = data.Get(); |
| 47 | ASSERT(ptr != nullptr); |
| 48 | ReadBytes(ptr, length); |
| 49 | } |
| 50 | |
| 51 | void ReadStream::Read(StringAnsi& data, int8 lock) |
| 52 | { |
no test coverage detected