Browse Source

* use bcdcompare instead of overloaded operator. Mantis #19613, patch by Lacak2

git-svn-id: trunk@19219 -
marco 14 years ago
parent
commit
09a2f07d5d
1 changed files with 1 additions and 8 deletions
  1. 1 8
      packages/fcl-db/src/base/bufdataset.pas

+ 1 - 8
packages/fcl-db/src/base/bufdataset.pas

@@ -701,14 +701,7 @@ end;
 
 function DBCompareBCD(subValue, aValue: pointer; options: TLocateOptions): LargeInt;
 begin
-  // A simple subtraction doesn't work, since it could be that the result
-  // doesn't fit into a LargeInt
-  if PBCD(subValue)^ < PBCD(aValue)^ then
-    result := -1
-  else if PBCD(subValue)^  > PBCD(aValue)^ then
-    result := 1
-  else
-    result := 0;
+  result:=BCDCompare(PBCD(subValue)^, PBCD(aValue)^);
 end;
 
 procedure unSetFieldIsNull(NullMask : pbyte;x : longint); //inline;