Lutz Roeder 5 лет назад
Родитель
Сommit
58dcd0ba3e
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      source/flatbuffers.js

+ 5 - 0
source/flatbuffers.js

@@ -103,6 +103,11 @@ flatbuffers.Reader = class {
         return this._dataView.getInt64(offset, true);
     }
 
+    int64_(position, offset, defaultValue) {
+        offset = this._offset(position, offset);
+        return offset ? this.int64(position + offset) : defaultValue;
+    }
+
     uint64(offset) {
         return this._dataView.getUint64(offset, true);
     }