1
0
mirror of https://github.com/Anuken/Mindustry.git synced 2024-09-11 08:15:35 +03:00

Struct bool setter fix

This commit is contained in:
Anuken 2024-04-15 16:31:07 -04:00
parent 49409cdc36
commit 8eb6a1068b

View File

@ -102,7 +102,7 @@ public class StructProcess extends BaseProcessor{
//bools: single bit, needs special case to clear things
setter.beginControlFlow("if(value)");
setter.addStatement("return ($T)(($L & ~(1L << $LL)) | (1L << $LL))", structType, structParam, offset, offset);
setter.addStatement("return ($T)($L | (1L << $LL))", structType, structParam, offset);
setter.nextControlFlow("else");
setter.addStatement("return ($T)(($L & ~(1L << $LL)))", structType, structParam, offset);
setter.endControlFlow();