aboutsummaryrefslogtreecommitdiffstats
path: root/parameter/EnumParameterType.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parameter/EnumParameterType.cpp')
-rw-r--r--parameter/EnumParameterType.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/parameter/EnumParameterType.cpp b/parameter/EnumParameterType.cpp
index dcdbfaa..145e556 100644
--- a/parameter/EnumParameterType.cpp
+++ b/parameter/EnumParameterType.cpp
@@ -154,7 +154,7 @@ bool CEnumParameterType::toBlackboard(const string& strValue, uint32_t& uiValue,
bool CEnumParameterType::checkValueAgainstRange(const string& strValue, int64_t value, CParameterAccessContext& parameterAccessContext, bool bHexaValue, bool bConversionSucceeded) const
{
// Enums are always signed, it means we have one less util bit
- int64_t maxValue = (1 << (getSize() * 8 - 1)) - 1;
+ int64_t maxValue = getMaxValue<uint64_t>();
int64_t minValue = -maxValue - 1;
if (!bConversionSucceeded || value < minValue || value > maxValue) {