Revert "(UsdLoader) Fix coverity issue - uint32 can't have less than 0 value"
authorANZ1217 <chihun.jeong@samsung.com>
Thu, 5 Jun 2025 05:29:52 +0000 (14:29 +0900)
committerANZ1217 <chihun.jeong@samsung.com>
Thu, 5 Jun 2025 05:29:52 +0000 (14:29 +0900)
This reverts commit ff9f11d29df2acbb48bef7b462670207268d872d.

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.