浏览代码

Read unsigned byte properly

Toni Helenius 2 年之前
父节点
当前提交
556b57c540
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf/GltfUtils.java

+ 2 - 2
jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf/GltfUtils.java

@@ -389,8 +389,8 @@ public class GltfUtils {
                 b = stream.readByte();
                 return Math.max(b / 127f, -1f);
             case UnsignedByte:
-                b = stream.readByte();
-                return b / 255f;
+                s = stream.readUnsignedByte();
+                return s / 255f;
             case Short:
                 s = stream.readShort();
                 return Math.max(s / 32767f, -1f);