Procházet zdrojové kódy

* Fixed mistake in r41325, bug #35099

git-svn-id: trunk@41352 -
joost před 6 roky
rodič
revize
0814dad0ba
1 změnil soubory, kde provedl 3 přidání a 4 odebrání
  1. 3 4
      packages/fcl-registry/src/winreg.inc

+ 3 - 4
packages/fcl-registry/src/winreg.inc

@@ -31,10 +31,9 @@ end;
 Function PrepKey(Const S : String) : String;
 Function PrepKey(Const S : String) : String;
 
 
 begin
 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;
 end;
 
 
 Function RelativeKey(Const S : String) : Boolean;
 Function RelativeKey(Const S : String) : Boolean;