Read a signed integer. "zwidth" is the zero-based byte count.
| 526 | |
| 527 | // Read a signed integer. "zwidth" is the zero-based byte count. |
| 528 | int32_t DexFile::ReadSignedInt(const uint8_t* ptr, int zwidth) { |
| 529 | int32_t val = 0; |
| 530 | for (int i = zwidth; i >= 0; --i) { |
| 531 | val = ((uint32_t)val >> 8) | (((int32_t)*ptr++) << 24); |
| 532 | } |
| 533 | val >>= (3 - zwidth) * 8; |
| 534 | return val; |
| 535 | } |
| 536 | |
| 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. |
nothing calls this directly
no outgoing calls
no test coverage detected