| 497 | |
| 498 | |
| 499 | string BinaryReader::ReadCString(size_t maxSize) |
| 500 | { |
| 501 | string result; |
| 502 | try |
| 503 | { |
| 504 | for (size_t i = 0; i < maxSize; i++) |
| 505 | { |
| 506 | char cur = Read8(); |
| 507 | if (cur == 0) |
| 508 | break; |
| 509 | result.push_back(cur); |
| 510 | } |
| 511 | } |
| 512 | catch (ReadException&) |
| 513 | { |
| 514 | ; |
| 515 | } |
| 516 | return result; |
| 517 | } |
no test coverage detected