From 3a77068088677cca6f1d50b13f75dbdabfd123ef Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Sat, 7 Sep 2019 00:15:10 -0400 Subject: [PATCH] Slightly more accurate natives check --- .../velocitypowered/natives/encryption/JavaVelocityCipher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/src/main/java/com/velocitypowered/natives/encryption/JavaVelocityCipher.java b/native/src/main/java/com/velocitypowered/natives/encryption/JavaVelocityCipher.java index 88f7fa921..5382da898 100644 --- a/native/src/main/java/com/velocitypowered/natives/encryption/JavaVelocityCipher.java +++ b/native/src/main/java/com/velocitypowered/natives/encryption/JavaVelocityCipher.java @@ -67,7 +67,7 @@ public class JavaVelocityCipher implements VelocityCipher { } private static ByteBuf toHeap(ByteBuf src) { - if (!src.isDirect()) { + if (src.hasArray()) { return src.retain(); }