Skip to content

Commit 5ad9a8b

Browse files
authored
refactor: Use R_ASSERT1_CURE to validate vectors in _compressed_normal.cpp (#1982)
1 parent 5410caf commit 5ad9a8b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/xrCore/_compressed_normal.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ void pvInitializeStatics(void)
4444

4545
u16 pvCompress(const Fvector& vec)
4646
{
47+
R_ASSERT1_CURE(_valid(vec), return 0);
48+
4749
if (fis_zero(vec.x) && fis_zero(vec.y) && fis_zero(vec.z))
4850
return 0;
49-
if (!_valid(vec))
50-
return 0;
5151

5252
// save copy
5353
Fvector tmp = vec;

0 commit comments

Comments
 (0)