Sfoglia il codice sorgente

IosGL: reset buffer position in fromArray()

Kirill Vainer 10 anni fa
parent
commit
389b117fb6
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      jme3-ios/src/main/java/com/jme3/renderer/ios/IosGL.java

+ 2 - 0
jme3-ios/src/main/java/com/jme3/renderer/ios/IosGL.java

@@ -90,7 +90,9 @@ public class IosGL implements GL, GLExt {
         if (buffer.remaining() < n) { 
             throw new BufferOverflowException();
         }
+        int pos = buffer.position();
         buffer.put(array, 0, n);
+        buffer.position(pos);
     }
     
     private static void checkLimit(Buffer buffer) {