Skip to content

Commit 4ad11b6

Browse files
authored
Merge pull request #111408 from mihe/jolt/version-crash-fix
Fix crash in Jolt when doing incremental builds
2 parents d61cd91 + a2d0e17 commit 4ad11b6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

thirdparty/jolt_physics/Jolt/RegisterTypes.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ void RegisterTypesInternal(uint64 inVersionID)
7474
{
7575
Trace("Version mismatch, make sure you compile the client code with the same Jolt version and compiler definitions!");
7676
uint64 mismatch = JPH_VERSION_ID ^ inVersionID;
77+
if (mismatch & 0xffffff)
78+
Trace("Client reported version %d.%d.%d, library version is %d.%d.%d.",
79+
(inVersionID >> 16) & 0xff, (inVersionID >> 8) & 0xff, inVersionID & 0xff,
80+
JPH_VERSION_MAJOR, JPH_VERSION_MINOR, JPH_VERSION_PATCH);
7781
auto check_bit = [mismatch](int inBit, const char *inLabel) { if (mismatch & (uint64(1) << (inBit + 23))) Trace("Mismatching define %s.", inLabel); };
7882
check_bit(1, "JPH_DOUBLE_PRECISION");
7983
check_bit(2, "JPH_CROSS_PLATFORM_DETERMINISTIC");

0 commit comments

Comments
 (0)