From 880610c39dce0f1e4e652c749456d6b3fc607dbd Mon Sep 17 00:00:00 2001 From: Michael Sippel Date: Fri, 10 Sep 2021 02:06:24 +0200 Subject: [PATCH] IntegerEditor: reverse digit sequence in get_value() to use the more commonplace endiannes as default --- nested/src/integer/editor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nested/src/integer/editor.rs b/nested/src/integer/editor.rs index 72d2678..aee6c37 100644 --- a/nested/src/integer/editor.rs +++ b/nested/src/integer/editor.rs @@ -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::>().into_iter().rev() { value += digit_value * weight; weight *= self.radix; }