< prev index next >

src/jdk.incubator.foreign/share/classes/jdk/internal/foreign/LayoutPath.java

Print this page

        

@@ -128,11 +128,11 @@
 
         checkAlignment(this);
 
         return JLI.memoryAddressViewVarHandle(
                 carrier,
-                layout.byteAlignment(),
+                layout.byteAlignment() - 1, //mask
                 ((ValueLayout) layout).order(),
                 Utils.bitsToBytesOrThrow(offset, IllegalStateException::new),
                 LongStream.of(scales).map(s -> Utils.bitsToBytesOrThrow(s, IllegalStateException::new)).toArray());
     }
 
< prev index next >