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

Method ReadUnsignedLong

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

Read an unsigned long. "zwidth" is the zero-based byte count, "fill_on_right" indicates which side we want to zero-fill from.

Source from the content-addressed store, hash-verified

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.
562uint64_t DexFile::ReadUnsignedLong(const uint8_t* ptr, int zwidth, bool fill_on_right) {
563 uint64_t val = 0;
564 for (int i = zwidth; i >= 0; --i) {
565 val = (val >> 8) | (((uint64_t)*ptr++) << 56);
566 }
567 if (!fill_on_right) {
568 val >>= (7 - zwidth) * 8;
569 }
570 return val;
571}
572
573std::string DexFile::PrettyMethod(uint32_t method_idx, bool with_signature) const {
574 if (method_idx >= NumMethodIds()) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected