From 0b772750b21d57b799897548da8c28dcef7de0e2 Mon Sep 17 00:00:00 2001 From: Jonah <47046556+jwbonner@users.noreply.github.com> Date: Sun, 22 Sep 2024 00:52:21 -0400 Subject: [PATCH] Fix decoding of struct schemas with whitespace (fixes #182) --- src/shared/log/StructDecoder.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/shared/log/StructDecoder.ts b/src/shared/log/StructDecoder.ts index f2af89fb..49eb0741 100644 --- a/src/shared/log/StructDecoder.ts +++ b/src/shared/log/StructDecoder.ts @@ -30,7 +30,10 @@ export default class StructDecoder { } private compileSchema(name: string, schema: string): boolean { - let valueSchemaStrs: string[] = schema.split(";").filter((schemaStr) => schemaStr.length > 0); + let valueSchemaStrs: string[] = schema + .trim() + .split(";") + .filter((schemaStr) => schemaStr.length > 0); let valueSchemas: ValueSchema[] = []; for (let i = 0; i < valueSchemaStrs.length; i++) { let schemaStr = valueSchemaStrs[i];