···109 let value = cmd.command().value();
110 let new_value = output_map
111 .calculate_from_value(output_type, value as i32)
112- .map_err(|_| ButtplugDeviceError::DeviceStepRangeError(0, value))?;
113 let mut new_command = cmd.command();
114- new_command.set_value(new_value as u32);
115 // We can't make a private trait impl to turn a ValueCmd into a CheckedValueCmd, and this
116 // is all about security, so we just copy. Silly, but it works for our needs in terms of
117 // making this a barrier.
···109 let value = cmd.command().value();
110 let new_value = output_map
111 .calculate_from_value(output_type, value as i32)
112+ .map_err(|_| ButtplugDeviceError::DeviceStepRangeError(0, value.abs() as u32))?;
113 let mut new_command = cmd.command();
114+ new_command.set_value(new_value);
115 // We can't make a private trait impl to turn a ValueCmd into a CheckedValueCmd, and this
116 // is all about security, so we just copy. Silly, but it works for our needs in terms of
117 // making this a barrier.