Skip to content
Snippets Groups Projects
Unverified Commit 6416b280 authored by Cyrill Leutwiler's avatar Cyrill Leutwiler Committed by GitHub
Browse files

[pallet-revive] bugfix decoding 64bit args in the decoder (#6695)


The argument index of the next argument is dictated by the size of the
current one.

---------

Signed-off-by: default avatarxermicus <cyrill@parity.io>
Co-authored-by: default avatarGitHub Action <action@github.com>
Co-authored-by: default avatarAlexander Theißen <alex.theissen@me.com>
parent fdb264d0
No related merge requests found
Pipeline #507548 waiting for manual action with stages
in 32 minutes and 18 seconds
title: '[pallet-revive] bugfix decoding 64bit args in the decoder'
doc:
- audience: Runtime Dev
description: The argument index of the next argument is dictated by the size of
the current one.
crates:
- name: pallet-revive-proc-macro
bump: patch
......@@ -342,7 +342,8 @@ where
const ALLOWED_REGISTERS: u32 = 6;
let mut registers_used = 0;
let mut bindings = vec![];
for (idx, (name, ty)) in param_names.clone().zip(param_types.clone()).enumerate() {
let mut idx = 0;
for (name, ty) in param_names.clone().zip(param_types.clone()) {
let syn::Type::Path(path) = &**ty else {
panic!("Type needs to be path");
};
......@@ -380,6 +381,7 @@ where
}
};
bindings.push(binding);
idx += size;
}
quote! {
#( #bindings )*
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment