From 081c016dfabc1bb5c05fe2f5e8bf9cae0b0e4226 Mon Sep 17 00:00:00 2001 From: Brian Webb Date: Sun, 7 Apr 2013 16:04:24 +0100 Subject: [PATCH] Added braces around if body. --- ground/openpilotgcs/src/plugins/uavobjects/uavobjectfield.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ground/openpilotgcs/src/plugins/uavobjects/uavobjectfield.cpp b/ground/openpilotgcs/src/plugins/uavobjects/uavobjectfield.cpp index 89260ff30..fa60d9154 100644 --- a/ground/openpilotgcs/src/plugins/uavobjects/uavobjectfield.cpp +++ b/ground/openpilotgcs/src/plugins/uavobjects/uavobjectfield.cpp @@ -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; }