port: another UB fix in bg.c

This commit is contained in:
fgsfds committed 2023-09-22 21:06:32 +02:00
1 parent 5ae29afdeb
commit 54842f50db
1 file changed
+4
+4
View File
@@ -4378,7 +4378,11 @@ bool bgTestHitInVtxBatch(struct coord *arg0, struct coord *arg1, struct coord *a
texturenum = *(s16 *) PHYS_TO_K0(tmp);
}
#ifdef AVOID_UB
if (batch->type == VTXBATCHTYPE_XLU && texturenum >= 0 && g_Textures[texturenum].surfacetype == SURFACETYPE_DEFAULT) {
#else
if (batch->type == VTXBATCHTYPE_XLU && g_Textures[texturenum].surfacetype == SURFACETYPE_DEFAULT) {
#endif
hit = false;
}