heyanthony / jmonkeyengine

Automatically exported from code.google.com/p/jmonkeyengine
0 stars 0 forks source link

BufferUtils.createFloatBuffer missing one element on null #579

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Just noticed while reading the source code:

BufferUtils.createFloatBuffer(Quaternion... data) and
BufferUtils.createFloatBuffer(Vector4f... data)

both use 
if (data[x] != null) {
   buff.put(data[x].getX()).put(data[x].getY()).put(data[x].getZ()).put(data[x].getW());
} else {
    buff.put(0).put(0).put(0);
}

Which should produce a problem if there are null elements  in the array, 
because there will be one element missing for each null element.

Original issue reported on code.google.com by quu...@googlemail.com on 16 Feb 2013 at 12:59

GoogleCodeExporter commented 8 years ago
Just noticed: duplicate of issue #572
Didnt find it, because the issue has no tag jme3. 

Original comment by quu...@googlemail.com on 16 Feb 2013 at 1:09

GoogleCodeExporter commented 8 years ago

Original comment by ShadowIs...@gmail.com on 16 Apr 2013 at 3:19