summaryrefslogtreecommitdiff
path: root/src/protocol/unreal32.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocol/unreal32.c')
-rw-r--r--src/protocol/unreal32.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/protocol/unreal32.c b/src/protocol/unreal32.c
index 083e64615..8ecfc90e9 100644
--- a/src/protocol/unreal32.c
+++ b/src/protocol/unreal32.c
@@ -1878,9 +1878,12 @@ int unreal_jointhrottle_mode_check(char *value)
if (one && two) {
param1 = atoi(one);
param2 = atoi(two);
+ if ((param1 >= 1) && (param1 <= 255) && (param2 >= 1) && (param2 <= 999)) {
+ free(tempValue);
+ return 1;
+ }
}
- if ((param1 >= 1) && (param1 <= 255) && (param2 >= 1) && (param2 <= 999))
- return 1;
+ free(tempValue);
return 0;
}