Applied patch from Reinier Olislagers. Fix for Mantis #24159.

rtl/objpas/strutils.pp, ReplaceStr & ReplaceText:
  Correctly assign the result value

git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@24028 3ad0048d-3df7-0310-abae-a5850022a9f2