소스 검색

signed zero handling

arpruss 8 년 전
부모
커밋
2c97ad46fa
1개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  1. 6 3
      split.html

+ 6 - 3
split.html

@@ -36,9 +36,12 @@ function getString(view, position, length) {
 
 function getVector(view, position) {
     if (ASCII_MODE) {
-        x = view.getUint32(position, true);
-        y = view.getUint32(position+4, true);
-        z = view.getUint32(position+8, true);
+        function fixZero(a) {
+            return a == 0x80000000 ? 0 : a;
+        }
+        x = fixZero(view.getUint32(position, true));
+        y = fixZero(view.getUint32(position+4, true));
+        z = fixZero(view.getUint32(position+8, true));
         return x.toString(16)+":"+y.toString(16)+":"+z.toString(16);
     }