MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / ReadSignedInt

Method ReadSignedInt

Bcore/src/main/cpp/dex/dex_file.cc:528–535  ·  view source on GitHub ↗

Read a signed integer. "zwidth" is the zero-based byte count.

Source from the content-addressed store, hash-verified

526
527// Read a signed integer. "zwidth" is the zero-based byte count.
528int32_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.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected