diff options
author | joost <joost@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2019-02-17 18:39:09 +0000 |
---|---|---|
committer | joost <joost@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2019-02-17 18:39:09 +0000 |
commit | 9fb6c8a08e4526b55285828e01fa0555202dab59 (patch) | |
tree | 4b825ec3290ffc74453c4d05a380c0921100788e /packages/fcl-registry | |
parent | f77fbe4ed38b8195209f82e26ffefb743fdf4ff9 (diff) | |
download | fpc-9fb6c8a08e4526b55285828e01fa0555202dab59.tar.gz |
* Fixed mistake in r41325, bug 35099
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@41352 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/fcl-registry')
-rw-r--r-- | packages/fcl-registry/src/winreg.inc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/packages/fcl-registry/src/winreg.inc b/packages/fcl-registry/src/winreg.inc index 63c51d6e8a..cc5fc37607 100644 --- a/packages/fcl-registry/src/winreg.inc +++ b/packages/fcl-registry/src/winreg.inc @@ -31,10 +31,9 @@ end; Function PrepKey(Const S : String) : String; begin - If Copy(S, 1, 1)='\' then - Result := Copy(Result, 2) - else - Result := S; + Result := S; + if (Result <> '') and (Result[1] = '\') then + System.Delete(Result, 1, 1); end; Function RelativeKey(Const S : String) : Boolean; |