IntegerEditor: reverse digit sequence in get_value() to use the more commonplace endiannes as default

This commit is contained in:
Michael Sippel 2021-09-10 02:06:24 +02:00
parent ebada704c0
commit 880610c39d
Signed by: senvas
GPG key ID: F96CF119C34B64A6

View file

@ -106,7 +106,7 @@ impl PosIntEditor {
pub fn get_value(&self) -> u32 {
let mut value = 0;
let mut weight = 1;
for digit_value in self.get_data_port().get_view().unwrap().iter() {
for digit_value in self.get_data_port().get_view().unwrap().iter().collect::<Vec<_>>().into_iter().rev() {
value += digit_value * weight;
weight *= self.radix;
}