From a159fdc80586cda86bb07ba5d11d29607ed50ec9 Mon Sep 17 00:00:00 2001 From: Mirek Fidler Date: Mon, 30 Oct 2023 13:37:09 +0100 Subject: [PATCH] Core: Minor fix of Value::GetOther * --- uppsrc/Core/Value.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uppsrc/Core/Value.cpp b/uppsrc/Core/Value.cpp index 78c150836..2e018441f 100644 --- a/uppsrc/Core/Value.cpp +++ b/uppsrc/Core/Value.cpp @@ -194,7 +194,7 @@ int Value::GetOtherInt() const if(IsNull()) return Null; return data.IsSpecial(BOOL_V) ? (int)GetSmall() : data.IsSpecial(INT64_V) ? (int)GetSmall() : - data.IsSpecial(FLOAT_V) ? (float)GetSmall() : + data.IsSpecial(FLOAT_V) ? (int)GetSmall() : (int)GetSmall(); } @@ -203,7 +203,7 @@ int64 Value::GetOtherInt64() const if(IsNull()) return Null; return data.IsSpecial(BOOL_V) ? (int64)GetSmall() : data.IsSpecial(INT_V) ? (int64)GetSmall() : - data.IsSpecial(FLOAT_V) ? (float)GetSmall() : + data.IsSpecial(FLOAT_V) ? (int64)GetSmall() : (int64)GetSmall(); } @@ -212,7 +212,7 @@ double Value::GetOtherDouble() const if(IsNull()) return Null; return data.IsSpecial(BOOL_V) ? (double)GetSmall() : data.IsSpecial(INT_V) ? (double)GetSmall() : - data.IsSpecial(FLOAT_V) ? (float)GetSmall() : + data.IsSpecial(FLOAT_V) ? (double)GetSmall() : (double)GetSmall(); }