Skip to content

Commit

Permalink
Yeet
Browse files Browse the repository at this point in the history
  • Loading branch information
mcm001 committed Sep 13, 2024
1 parent bfa1b4f commit 752c9b8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/shared/log/PhotonStructDecoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export default class PhotonStructDecoder {
value: Uint8Array | DataView
): { data: unknown; schemaTypes: { [key: string]: string }; } {
const ret = this.decodeImpl(name, value);
console.log(ret.schemaTypes);
return {
data: ret.data,
schemaTypes: ret.schemaTypes
Expand Down Expand Up @@ -168,8 +169,8 @@ export default class PhotonStructDecoder {
}
} else {
// Child struct
outputSchemaTypes[valueSchema.name] = valueSchema.type;
if (vlaLength !== null) {
outputSchemaTypes[valueSchema.name] = valueSchema.type + "[]";
let inner: unknown[] = [];
for (let i = 0; i < vlaLength; i++) {
let child = this.decodeImpl(
Expand All @@ -186,6 +187,7 @@ export default class PhotonStructDecoder {
}
outputData[valueSchema.name] = inner;
} else {
outputSchemaTypes[valueSchema.name] = valueSchema.type;
let child = this.decodeImpl(
valueSchema.type,
new DataView(dataView.buffer, dataView.byteOffset + offset, dataView.byteLength - offset)
Expand Down

0 comments on commit 752c9b8

Please sign in to comment.