File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ namespace embree
256256 throw_RTCError (RTC_ERROR_INVALID_ARGUMENT," item count too large" );
257257 }
258258
259- if (offset_in > 0 && offset_in >= buffer_in->numBytes ) {
259+ if (offset_in > buffer_in->numBytes ) {
260260 throw_RTCError (RTC_ERROR_INVALID_ARGUMENT, " offset too large" );
261261 }
262262
Original file line number Diff line number Diff line change @@ -155,16 +155,16 @@ namespace embree
155155 __forceinline unsigned int getNumQuads (const size_t gridID) const
156156 {
157157 const Grid& g = grid (gridID);
158- assert (g.resX > maxGridRes);
159- assert (g.resY > maxGridRes);
158+ assert (g.resX <= maxGridRes);
159+ assert (g.resY <= maxGridRes);
160160 return (unsigned int ) max ((int )1 ,((int )g.resX -1 ) * ((int )g.resY -1 ));
161161 }
162162
163163 __forceinline unsigned int getNumSubGrids (const size_t gridID) const
164164 {
165165 const Grid& g = grid (gridID);
166- assert (g.resX > maxGridRes);
167- assert (g.resY > maxGridRes);
166+ assert (g.resX <= maxGridRes);
167+ assert (g.resY <= maxGridRes);
168168 return max ((unsigned int )1 ,((unsigned int )g.resX >> 1 ) * ((unsigned int )g.resY >> 1 ));
169169 }
170170
You can’t perform that action at this time.
0 commit comments