assumes that the array has at least one element, but this is not true when the array is empty.
I would submit a Pull Request, but I'm not sure if the preference would be to add an array.length > 0 check around array[0] = this, or to simply add if (array.length == 0) return array; to the top of the method.
jna/src/com/sun/jna/Structure.java
Line 1520 in 4a2d3be
I would submit a Pull Request, but I'm not sure if the preference would be to add an
array.length > 0check aroundarray[0] = this, or to simply addif (array.length == 0) return array;to the top of the method.