test write_bjdata_ndarray return value as boolean

This commit is contained in:
Qianqian Fang 2022-04-23 18:14:31 -04:00
parent 05adfcc3cd
commit bc2f11d565
2 changed files with 2 additions and 2 deletions

View File

@ -879,7 +879,7 @@ class binary_writer
{
if (use_bjdata && j.m_value.object->size() == 3 && j.m_value.object->find("_ArrayType_") != j.m_value.object->end() && j.m_value.object->find("_ArraySize_") != j.m_value.object->end() && j.m_value.object->find("_ArrayData_") != j.m_value.object->end())
{
if (write_bjdata_ndarray(*j.m_value.object, use_count, use_type) == 0) // decode bjdata ndarray in the JData format (https://github.com/NeuroJSON/jdata)
if (!write_bjdata_ndarray(*j.m_value.object, use_count, use_type)) // decode bjdata ndarray in the JData format (https://github.com/NeuroJSON/jdata)
{
break;
}

View File

@ -14777,7 +14777,7 @@ class binary_writer
{
if (use_bjdata && j.m_value.object->size() == 3 && j.m_value.object->find("_ArrayType_") != j.m_value.object->end() && j.m_value.object->find("_ArraySize_") != j.m_value.object->end() && j.m_value.object->find("_ArrayData_") != j.m_value.object->end())
{
if (write_bjdata_ndarray(*j.m_value.object, use_count, use_type) == 0) // decode bjdata ndarray in the JData format (https://github.com/NeuroJSON/jdata)
if (!write_bjdata_ndarray(*j.m_value.object, use_count, use_type)) // decode bjdata ndarray in the JData format (https://github.com/NeuroJSON/jdata)
{
break;
}