diff --git a/flaim/util/basic_test.cpp b/flaim/util/basic_test.cpp index f7512ba..59b079e 100644 --- a/flaim/util/basic_test.cpp +++ b/flaim/util/basic_test.cpp @@ -2155,15 +2155,6 @@ RCODE IFlmTestImpl::compareRecords( pszDb2, (unsigned)uiLevel2); goto Exit; } - if (uiDataType1 != uiDataType2) - { - rc = RC_SET( FERR_FAILURE); - f_sprintf( m_szFailInfo, "Field Type mismatch in %s, Fld: %u, %s: %u, %s: %u", - pszWhat, (unsigned)uiFieldNum1, - pszDb1, (unsigned)uiDataType1, - pszDb2, (unsigned)uiDataType2); - goto Exit; - } if (uiDataLength1 != uiDataLength2) { rc = RC_SET( FERR_FAILURE); @@ -2173,6 +2164,21 @@ RCODE IFlmTestImpl::compareRecords( pszDb2, (unsigned)uiDataLength2); goto Exit; } + + // Data type is not guaranteed to be preserved if there is no data. + + if (uiDataLength1) + { + if (uiDataType1 != uiDataType2) + { + rc = RC_SET( FERR_FAILURE); + f_sprintf( m_szFailInfo, "Field Type mismatch in %s, Fld: %u, %s: %u, %s: %u", + pszWhat, (unsigned)uiFieldNum1, + pszDb1, (unsigned)uiDataType1, + pszDb2, (unsigned)uiDataType2); + goto Exit; + } + } if (uiEncLength1 != uiEncLength2) { rc = RC_SET( FERR_FAILURE);