Revert "(UsdLoader) Fix coverity issue - uint32 can't have less than 0 value"
authorWoochan Lee <wc0917.lee@samsung.com>
Thu, 22 May 2025 10:52:17 +0000 (19:52 +0900)
committerWoochan Lee <wc0917.lee@samsung.com>
Thu, 22 May 2025 10:52:17 +0000 (19:52 +0900)
This reverts commit 37ace7d9b491cadaeeabf472b16b80922e37782d.

dali-usd-loader/internal/usd-loader-impl.cpp

index b4d3712b0e8516d2c03e7325875bc4ecfe2d4577..0f60138a35e1a26cdfb684bdcd74fda602f58d10 100644 (file)
@@ -696,7 +696,7 @@ void UsdLoaderImpl::Impl::ProcessMeshTexcoords(MeshDefinition& meshDefinition, s
           // Handle vertex-based UVs
           for(auto x : subIndexArray)
           {
-            if(DALI_UNLIKELY(static_cast<size_t>(x) >= rawUVs.size()))
+            if(DALI_UNLIKELY(x < 0 || static_cast<size_t>(x) >= rawUVs.size()))
             {
               // This should never happen. The USD spec and the “indexed” primvar APIs guarantee that
               // you will never have an index that lies outside the authored-values array.