Browse Source

* fix for regexpr unicode mode. (multiple a move with the size of the base char type)
Patch by Ludo B., mantis #020806

git-svn-id: trunk@19754 -

marco 13 years ago
parent
commit
a19b627739
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/regexpr/src/regexpr.pas

+ 1 - 1
packages/regexpr/src/regexpr.pas

@@ -1304,7 +1304,7 @@ function TRegExpr.GetMatch (Idx : integer) : RegExprString;
    then begin
    then begin
      //SetString (Result, startp [idx], endp [idx] - startp [idx])
      //SetString (Result, startp [idx], endp [idx] - startp [idx])
      SetLength(Result,endp [idx] - startp [idx]);
      SetLength(Result,endp [idx] - startp [idx]);
-     System.Move(startp [idx]^,Result[1],length(Result));
+     System.Move(startp [idx]^,Result[1],length(Result)*sizeof(REChar));
    end
    end
    else Result := '';
    else Result := '';
  end; { of function TRegExpr.GetMatch
  end; { of function TRegExpr.GetMatch