| 58 | } |
| 59 | |
| 60 | size_t trimNullByteLength(const vector<uchar> &bin, size_t charWidth) { |
| 61 | if (charWidth == 0 || bin.empty()) |
| 62 | return 0; |
| 63 | for (size_t i = 0; i + charWidth <= bin.size(); i += charWidth) { |
| 64 | bool zero = true; |
| 65 | for (size_t j = 0; j < charWidth; ++j) { |
| 66 | if (bin[i + j] != 0) { |
| 67 | zero = false; |
| 68 | break; |
| 69 | } |
| 70 | } |
| 71 | if (zero) |
| 72 | return i; |
| 73 | } |
| 74 | return bin.size(); |
| 75 | } |
| 76 | |
| 77 | bool address_has_operator(const wstring &address) { |
| 78 | for (wchar_t c : address) { |
no test coverage detected