mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-02 17:41:51 +00:00
Fix dynamic_bitset implementation
This commit is contained in:
@@ -362,9 +362,9 @@ static void get_process_info(int client, const sock_cred *cred) {
|
||||
int slots = read_int(client);
|
||||
int id = 0;
|
||||
for (int i = 0; i < slots; ++i) {
|
||||
unsigned long l = 0;
|
||||
dynamic_bitset::slot_type l = 0;
|
||||
xxread(client, &l, sizeof(l));
|
||||
bitset<sizeof(unsigned long)> bits(l);
|
||||
dynamic_bitset::slot_bits bits(l);
|
||||
for (int j = 0; id < module_list->size(); ++j, ++id) {
|
||||
if (!bits[j]) {
|
||||
// Either not a zygisk module, or incompatible
|
||||
|
||||
@@ -505,7 +505,7 @@ void HookContext::nativeForkSystemServer_pre() {
|
||||
}
|
||||
write_int(fd, bits.slots());
|
||||
for (int i = 0; i < bits.slots(); ++i) {
|
||||
unsigned long l = bits.to_ulong(i);
|
||||
auto l = bits.get_slot(i);
|
||||
xwrite(fd, &l, sizeof(l));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user