diff --git a/engine/source/scriptlib/Parser.c b/engine/source/scriptlib/Parser.c index 108d85f91..bfd729ca2 100644 --- a/engine/source/scriptlib/Parser.c +++ b/engine/source/scriptlib/Parser.c @@ -1834,17 +1834,21 @@ void Parser_Unary_expr(Parser *pparser ) { Parser_Match(pparser); Parser_Unary_expr(pparser ); - pInstruction = (Instruction *)List_Retrieve(pparser->pIList); - if(pInstruction->OpCode == CONSTINT) - { - int constvar = ~(atoi(pInstruction->theToken->theSource)); - sprintf(buf, "%d", constvar); - strcpy(pInstruction->theToken->theSource, buf); - } - else - { - Parser_AddInstructionViaToken(pparser, BIT_NOT, (Token *)NULL, NULL ); - } + + /* + * Caskey, Damon V. + * 2026-06-08 + * + * Do not constant-fold bitwise NOT here. + * The legacy atoi()/int fold truncates + * 64-bit integer constants before they can + * reach the ScriptVariant operator path. + * + * Emit BIT_NOT so runtime handling preserves + * VT_INTEGER, VT_INTEGER64, and VT_UINTEGER64 + * carrier semantics. + */ + Parser_AddInstructionViaToken(pparser, BIT_NOT, (Token *)NULL, NULL ); } else { diff --git a/engine/version.tmp b/engine/version.tmp new file mode 100644 index 000000000..da3e59338 --- /dev/null +++ b/engine/version.tmp @@ -0,0 +1,20 @@ +/* + * OpenBOR - http://www.ChronoCrash.com + * ----------------------------------------------------------------------- + * All rights reserved, see LICENSE in OpenBOR root for details. + * + * Copyright (c) OpenBOR Team + */ + +#ifndef VERSION_H +#define VERSION_H + +#define VERSION_NAME "OpenBOR" +#define VERSION_MAJOR "4" +#define VERSION_MINOR "0" +#define VERSION_BUILD "7779" +#define VERSION_BUILD_INT 7779 +#define VERSION_COMMIT "fa1c220" +#define VERSION "v"VERSION_MAJOR"."VERSION_MINOR" Build "VERSION_BUILD" (commit hash: "VERSION_COMMIT")" + +#endif