Fixed buffer overflow when increasing the size of a BitmapText (issue 486)
thanks to Daniel Brunton for the patch http://code.google.com/p/jmonkeyengine/issues/detail?id=486&colspec=ID%20Type%20Status%20Component%20Priority%20Product%20Milestone%20Owner%20Summary&start=100 git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9278 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
7c101bb097
commit
7445565df3
@ -1062,7 +1062,7 @@ public final class BufferUtils {
|
||||
int position = (buffer != null ? buffer.position() : 0);
|
||||
FloatBuffer newVerts = createFloatBuffer(position + required);
|
||||
if (buffer != null) {
|
||||
buffer.rewind();
|
||||
buffer.flip();
|
||||
newVerts.put(buffer);
|
||||
newVerts.position(position);
|
||||
}
|
||||
@ -1076,7 +1076,7 @@ public final class BufferUtils {
|
||||
int position = (buffer != null ? buffer.position() : 0);
|
||||
ShortBuffer newVerts = createShortBuffer(position + required);
|
||||
if (buffer != null) {
|
||||
buffer.rewind();
|
||||
buffer.flip();
|
||||
newVerts.put(buffer);
|
||||
newVerts.position(position);
|
||||
}
|
||||
@ -1090,7 +1090,7 @@ public final class BufferUtils {
|
||||
int position = (buffer != null ? buffer.position() : 0);
|
||||
ByteBuffer newVerts = createByteBuffer(position + required);
|
||||
if (buffer != null) {
|
||||
buffer.rewind();
|
||||
buffer.flip();
|
||||
newVerts.put(buffer);
|
||||
newVerts.position(position);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user