This is an automated email from the ASF dual-hosted git repository.

jimjag pushed a commit to branch hsqldb2
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 78a00c0bf03bedf246521c59eb3a7c7185d0cd33
Author: Jim Jagielski <[email protected]>
AuthorDate: Sun Nov 8 07:38:11 2026 -0500

    connectivity: check for NULL before comparing values of different types
    
    With the type check first, a NULL DOUBLE was equal to an INTEGER 0.
---
 main/connectivity/source/commontools/FValue.cxx | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/main/connectivity/source/commontools/FValue.cxx 
b/main/connectivity/source/commontools/FValue.cxx
index a449c8c565..e3f09e3ae0 100644
--- a/main/connectivity/source/commontools/FValue.cxx
+++ b/main/connectivity/source/commontools/FValue.cxx
@@ -783,6 +783,12 @@ sal_Bool operator==(const DateTime& _rLH,const DateTime& 
_rRH)
 
 bool ORowSetValue::operator==(const ORowSetValue& _rRH) const
 {
+       if ( m_bNull != _rRH.isNull() )
+        return false;
+
+       if(m_bNull && _rRH.isNull())
+               return true;
+
        if ( m_eTypeKind != _rRH.m_eTypeKind )
     {
         switch(m_eTypeKind)
@@ -805,10 +811,6 @@ bool ORowSetValue::operator==(const ORowSetValue& _rRH) 
const
             }
         return false;
     }
-    if ( m_bNull != _rRH.isNull() )
-            return false;
-       if(m_bNull && _rRH.isNull())
-               return true;
 
        bool bRet = false;
        OSL_ENSURE(!m_bNull,"SHould not be null!");

Reply via email to