Explorar o código

rtl: pass exact size to delete instead of full string length

git-svn-id: trunk@22418 -
paul %!s(int64=13) %!d(string=hai) anos
pai
achega
a2548fc9f9
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      rtl/unix/sysunix.inc

+ 1 - 1
rtl/unix/sysunix.inc

@@ -36,7 +36,7 @@ begin
     p:=Pos('.',Result);
     if p>0 then Delete(Result,1,p);
     p:=Pos('@',Result);
-    if p>0 then Delete(Result,p,length(Result));
+    if p>0 then Delete(Result,p,length(Result)-p+1);
   end;
 end;