Added checks for fields of storage_value!.
@@ -20,6 +20,13 @@ macro_rules! storage_value {
$crate::messages::Field::write(&self.raw, buffer, from, to);
}
+ fn check(buffer: &'a [u8], from: usize, to: usize) -> Result<(), $crate::messages::Error> {
+
+ let raw_message: $crate::messages::RawMessage = $crate::messages::Field::read(buffer, from, to);
+ $(raw_message.check::<$field_type>($from, $to)?;)*
+ Ok(())
+ }
+
fn field_size() -> usize {
1
}
