Skip to content

Commit 2f9cccd

Browse files
committed
build fix, update changelog
1 parent dc0eb83 commit 2f9cccd

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66

77
- Add `JUMPSTACK` kRISC instruction to support jump tables for switch case (thanks @CoderCatGG) [commit](https://github.com/KSP-KOS/KOS/commit/3089ecc2f6bf15ee3a6d3a8722ce1efc7e8415c4)
88
- Add `ALLHIDDENFIELDS`, `ALLHIDDENFIELDNAMES`, `HASHIDDENFIELD` and `GETHIDDENFIELD` to access fields of partmodules that are not visible in the UI (thanks @AntonKuzin) [commit](https://github.com/KSP-KOS/KOS/commit/c047c3210bf74fc529c7eb1703ad8110e6bc4abc)
9+
- Add `ACTUATION` suffix to steeringmanager (thanks @DBooots) [pr](https://github.com/KSP-KOS/KOS/pull/3162)
910

1011
### Performance Improvements
1112

1213
- Accessing the non-scalar suffixes of a widget `Style` no longer creates new objects - they are shared for each call. This may be a breaking change if your script was relying on getting a distinct object each time.
14+
- Remove redundant opcode from `until` loops (thanks @DBooots) [pr](https://github.com/KSP-KOS/KOS/pull/3164)
1315

1416
### Bug Fixes
1517

src/kOS.Safe/Compilation/Opcode.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,9 +1058,10 @@ public class OpcodeBranchIfFalse : BranchOpcode
10581058

10591059
public override void Execute(ICpu cpu)
10601060
{
1061+
object value = cpu.PopValueArgument();
10611062
try
10621063
{
1063-
bool condition = Convert.ToBoolean(cpu.PopValueArgument());
1064+
bool condition = Convert.ToBoolean(value);
10641065
DeltaInstructionPointer = !condition ? Distance : 1;
10651066
}
10661067
catch
@@ -1085,9 +1086,10 @@ public class OpcodeBranchIfTrue : BranchOpcode
10851086

10861087
public override void Execute(ICpu cpu)
10871088
{
1089+
object value = cpu.PopValueArgument();
10881090
try
10891091
{
1090-
bool condition = Convert.ToBoolean(cpu.PopValueArgument());
1092+
bool condition = Convert.ToBoolean(value);
10911093
DeltaInstructionPointer = condition ? Distance : 1;
10921094
}
10931095
catch

0 commit comments

Comments
 (0)