Skip to content
Permalink
Browse files

fixed VariantToInteger/TDocVariantData.GetAsInteger with varLongWord …

…values
  • Loading branch information...
Arnaud Bouchez
Arnaud Bouchez committed Mar 16, 2019
1 parent 618aecc commit 6b1f0a7ebd47f35cdd4a18b31ff35d87d448155a
Showing with 4 additions and 5 deletions.
  1. +2 −2 SynCommons.pas
  2. +1 −2 SynSM.pas
  3. +1 −1 SynopseCommit.inc
varShortInt: Value := VShortInt;
varWord: Value := VWord;
varLongWord:
if (VLongWord>=cardinal(Low(integer))) and (VLongWord<=cardinal(High(integer))) then
if VLongWord<=cardinal(High(integer)) then
Value := VLongWord else begin
result := false;
exit;
found := GetVarData(aName,aSortedCompare);
if found=nil then
result := false else
result := VariantToInteger(PVariant(found)^,aValue)
result := VariantToInteger(PVariant(found)^,aValue);
end;

function TDocVariantData.GetAsInt64(const aName: RawUTF8; out aValue: Int64;
@@ -1645,8 +1645,7 @@ procedure TSMValue.SetVariant(cx: PJSContext; const Value: Variant);
varWord:
FValue := INT_TO_JSVAL(VWord);
varLongWord:
if (VLongWord>=cardinal(Low(integer))) and
(VLongWord<=cardinal(High(integer))) then
if VLongWord<=cardinal(high(Integer)) then
FValue := INT_TO_JSVAL(VLongWord) else
FValue := DOUBLE_TO_JSVAL(VLongWord);
{$endif}
@@ -1 +1 @@
'1.18.5110'
'1.18.5111'

0 comments on commit 6b1f0a7

Please sign in to comment.
You can’t perform that action at this time.