瀏覽代碼

* fix for StrPas() by Sergey Korshunoff <[email protected]> (merged)

Jonas Maebe 23 年之前
父節點
當前提交
af5f1fbcb6
共有 1 個文件被更改,包括 5 次插入7 次删除
  1. 5 7
      rtl/objpas/syspch.inc

+ 5 - 7
rtl/objpas/syspch.inc

@@ -36,13 +36,8 @@ type
 {  StrPas converts a PChar to a pascal string  }
 
 function StrPas(Str: PChar): string;
-var
-  l: Integer;
 begin
-  l := StrLen(Str);
-  SetLength(result, l);
-  if l > 0 then
-    Move(Str^, result[1], l);
+  Result:=Str;
 end ;
 
 {  StrAlloc allocates a buffer of Size + 4
@@ -122,7 +117,10 @@ end ;
 
 {
   $Log$
-  Revision 1.4  2001-07-30 10:21:09  sg
+  Revision 1.5  2002-08-01 16:53:14  jonas
+    * fix for StrPas() by Sergey Korshunoff <[email protected]> (merged)
+
+  Revision 1.4  2001/07/30 10:21:09  sg
   * Two moves with a string as target are now only exectuted if the number of
     bytes to move is greater than 0. This prevents RTE201's when compiled
     with range checks enabled.