Skip to content

Commit 113c80e

Browse files
committed
Obj: use INT32_MAX for NA values
1 parent bfc892d commit 113c80e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/CAPI/CAPI_Obj.pas

+2-2
Original file line numberDiff line numberDiff line change
@@ -1715,7 +1715,7 @@ procedure Batch_SetInt32Array(batch: TDSSObjectPtr; batchSize: Integer; Index: I
17151715
// Faster path
17161716
for i := 1 to batchSize do
17171717
begin
1718-
if (allowNA) or (Value^ <> $80000000) then
1718+
if (allowNA) or (Value^ <> $7fffffff) then
17191719
begin
17201720
// check for each element, in case the element is being edited somewhere else
17211721
singleEdit := not (Flg.EditingActive in batch^.Flags);
@@ -1738,7 +1738,7 @@ procedure Batch_SetInt32Array(batch: TDSSObjectPtr; batchSize: Integer; Index: I
17381738

17391739
for i := 1 to batchSize do
17401740
begin
1741-
if (allowNA) or (Value^ <> $80000000) then
1741+
if (allowNA) or (Value^ <> $7fffffff) then
17421742
batch^.SetInteger(Index, Value^, setterFlags);
17431743
inc(batch);
17441744
inc(Value)

src/Common/DSSClass.pas

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ interface
9292
// for other components if we think it fits.
9393
AvoidFullRecalc = 1,
9494

95-
// For batch operations, skip NA values -- values of NaN for float64, INT32_MIN (0x80000000) for int32, null pointers for strings.
95+
// For batch operations, skip NA values -- values of NaN for float64, INT32_MAX (0x7fffffff) for int32, null pointers for strings.
9696
SkipNA = 2,
9797

9898
Reserved3 = 3,

0 commit comments

Comments
 (0)