1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

Added braces around if body.

This commit is contained in:
Brian Webb 2013-04-07 16:04:24 +01:00
parent e27be3f594
commit 081c016dfa

View File

@ -1015,8 +1015,9 @@ void UAVObjectField::setValue(const QVariant& value, quint32 index)
{
qint8 tmpenum = options.indexOf( value.toString() );
// Default to 0 on invalid values.
if(tmpenum < 0)
if(tmpenum < 0) {
tmpenum = 0;
}
memcpy(&data[offset + numBytesPerElement*index], &tmpenum, numBytesPerElement);
break;
}