Skip to content

Commit 1cd58d7

Browse files
committed
Update FFILib.kt
1 parent 25b76fd commit 1cd58d7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • src/main/kotlin/com/nekiplay/hypixelcry/features/lua/objects/misc

src/main/kotlin/com/nekiplay/hypixelcry/features/lua/objects/misc/FFILib.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,10 @@ class FFILib : LuaTable() {
406406

407407
val field = cType.fields?.get(key.tojstring())
408408
if (field != null) {
409+
if (field.type.arraySize > 0) {
410+
val arrayPtr = peer.share(field.offset.toLong())
411+
return CData(arrayPtr, field.type, ffi)
412+
}
409413
return getValueAt(peer, field.offset.toLong(), field.type)
410414
}
411415

0 commit comments

Comments
 (0)