Read an unsigned integer. "zwidth" is the zero-based byte count, "fill_on_right" indicates which side we want to zero-fill from.
| 537 | // Read an unsigned integer. "zwidth" is the zero-based byte count, |
| 538 | // "fill_on_right" indicates which side we want to zero-fill from. |
| 539 | uint32_t DexFile::ReadUnsignedInt(const uint8_t* ptr, int zwidth, bool fill_on_right) { |
| 540 | uint32_t val = 0; |
| 541 | for (int i = zwidth; i >= 0; --i) { |
| 542 | val = (val >> 8) | (((uint32_t)*ptr++) << 24); |
| 543 | } |
| 544 | if (!fill_on_right) { |
| 545 | val >>= (3 - zwidth) * 8; |
| 546 | } |
| 547 | return val; |
| 548 | } |
| 549 | |
| 550 | // Read a signed long. "zwidth" is the zero-based byte count. |
| 551 | int64_t DexFile::ReadSignedLong(const uint8_t* ptr, int zwidth) { |
nothing calls this directly
no outgoing calls
no test coverage detected