Browse Source

Fix cpu16 error in AtomicCmpExchange

Pierre Muller 2 years ago
parent
commit
ba2b29bd2c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      rtl/inc/system.inc

+ 1 - 1
rtl/inc/system.inc

@@ -2234,7 +2234,7 @@ end;
 function AtomicCmpExchange(var Target: word; NewValue, Comperand: word): word; {$ifdef SYSTEMINLINE}inline{$endif};
 
 begin
-  Result:=InterlockedCompareExchange(TargetNewValue, Comperand);
+  Result:=InterlockedCompareExchange(Target, NewValue, Comperand);
 end;