diff --git a/classlib/src/main/java/org/teavm/classlib/java/lang/TObject.java b/classlib/src/main/java/org/teavm/classlib/java/lang/TObject.java index 10569d90d..5cadc4cc2 100644 --- a/classlib/src/main/java/org/teavm/classlib/java/lang/TObject.java +++ b/classlib/src/main/java/org/teavm/classlib/java/lang/TObject.java @@ -257,7 +257,7 @@ public class TObject { } return monitor.id; } else { - identity = WasmGCSupport.nextObjectId(); + identity = WasmGCSupport.nextObjectId() & 0x7ffffff; setWasmGCIdentity(identity); } }