1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Fix some code found by Coverity Scan and PVS Studio

This commit is contained in:
qarmin
2019-07-23 09:14:31 +02:00
parent e466dc2daa
commit aab8da25ad
24 changed files with 71 additions and 65 deletions

View File

@@ -274,8 +274,8 @@ static void _generate_contacts_from_supports(const Vector3 *p_points_A, int p_po
points_B = p_points_B;
}
int version_A = (pointcount_A > 3 ? 3 : pointcount_A) - 1;
int version_B = (pointcount_B > 3 ? 3 : pointcount_B) - 1;
int version_A = (pointcount_A > 2 ? 2 : pointcount_A) - 1;
int version_B = (pointcount_B > 2 ? 2 : pointcount_B) - 1;
GenerateContactsFunc contacts_func = generate_contacts_func_table[version_A][version_B];
ERR_FAIL_COND(!contacts_func);