* fcl-db/dbase: fix for dbf_common Memscan fixes DBase3 memo issues. Thanks to J.G. Johansen

git-svn-id: trunk@24264 -
This commit is contained in:
reiniero 2013-04-18 06:20:28 +00:00
parent f97cd6997c
commit 1b942b52d4

View File

@ -408,7 +408,9 @@ function MemScan(const Buffer: Pointer; Chr: Byte; Length: Integer): Pointer;
var
I: Integer;
begin
I := System.IndexByte(Buffer, Length, Chr);
// Make sure we pass a buffer of bytes instead of a pchar otherwise
// the call will always fail
I := System.IndexByte(PByte(Buffer)^, Length, Chr);
if I = -1 then
Result := nil
else