From b8b67fce3d65d059d0026df6cce87f66e6954b11 Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Mon, 16 Jan 2023 09:15:20 +0000 Subject: [PATCH] Testing sanitiser --- source/compiler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/compiler.c b/source/compiler.c index bc43506..181c053 100644 --- a/source/compiler.c +++ b/source/compiler.c @@ -788,7 +788,7 @@ static Opcode writeCompilerWithJumps(Compiler* compiler, ASTNode* node, void* br //push the return, with the number of literals compiler->bytecode[compiler->count++] = OP_FN_RETURN; //1 byte - *((unsigned short*)(compiler->bytecode + compiler->count)) = (unsigned short)(node->returns.returns->fnCollection.count); //2 bytes + memcpy(compiler->bytecode + compiler->count, &node->returns.returns->fnCollection.count, sizeof(unsigned short)); compiler->count += sizeof(unsigned short); } break;