Prechádzať zdrojové kódy

Update flatbuffers.js

Lutz Roeder 1 mesiac pred
rodič
commit
4b6e40c2a4
2 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 1 1
      source/executorch.js
  2. 1 1
      source/flatbuffers.js

+ 1 - 1
source/executorch.js

@@ -570,7 +570,7 @@ xnnpack.Node = class {
             let value = ArrayBuffer.isView(obj) ? Array.from(obj) : obj;
             let type = 'attribute';
             if (name.endsWith('_id')) {
-                value = obj === -1 ? [] : [values.map(obj)];
+                value = obj === -1 || obj === 0xFFFFFFFF ? [] : [values.map(obj)];
                 type = null;
             }
             const argument = new xnnpack.Argument(name, value, type);

+ 1 - 1
source/flatbuffers.js

@@ -84,7 +84,7 @@ flatbuffers.BinaryReader = class {
 
     uint32_(position, offset, defaultValue) {
         offset = this.__offset(position, offset);
-        return offset ? this.int32(position + offset) : defaultValue;
+        return offset ? this.uint32(position + offset) : defaultValue;
     }
 
     int64_(position, offset, defaultValue) {