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

Method ReadSignedLong

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

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

Source from the content-addressed store, hash-verified

549
550// Read a signed long. "zwidth" is the zero-based byte count.
551int64_t DexFile::ReadSignedLong(const uint8_t* ptr, int zwidth) {
552 int64_t val = 0;
553 for (int i = zwidth; i >= 0; --i) {
554 val = ((uint64_t)val >> 8) | (((int64_t)*ptr++) << 56);
555 }
556 val >>= (7 - zwidth) * 8;
557 return val;
558}
559
560// Read an unsigned long. "zwidth" is the zero-based byte count,
561// "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