| 28 | } |
| 29 | |
| 30 | std::string read_string(std::istream& is) |
| 31 | { |
| 32 | uint16_t length = read16(is); |
| 33 | std::vector<char> str(length+1); |
| 34 | if (length > 0) { |
| 35 | is.read(&str[0], length); |
| 36 | str[length] = 0; |
| 37 | } |
| 38 | else |
| 39 | str[0] = 0; |
| 40 | |
| 41 | return std::string(&str[0]); |
| 42 | } |
| 43 | |
| 44 | } |
no outgoing calls
no test coverage detected