From 1062e048c493607b7b57faf83570562fa44c0f9c Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Sat, 6 Jan 2024 05:59:19 -0500 Subject: [PATCH] Fix Init Symbol --- src/index.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index d7f6603..dd8568b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -130,7 +130,11 @@ function makeHeaderPart(allowCpp: boolean) { } // Return - return structures; + let result = ''; + result += '// Init\n'; + result += 'void init_symbols();\n\n'; + result += structures; + return result; } // Create Main Header @@ -148,8 +152,6 @@ function makeMainHeader(output: string) { result += '\n// Shortcuts\n'; result += 'typedef unsigned char uchar;\n'; result += 'typedef unsigned int uint;\n'; - result += '\n// Init\n'; - result += 'void init_symbols();\n'; result += '\n// Forward Declarations\n'; for (const name in STRUCTURE_FILES) { result += `typedef struct ${name} ${name};\n`;