Commit 9f639397 by Ed Schonberg Committed by Geert Bosch

g-os_lib.adb (Add_To_Command): use explicit loop to move string into Command, an…

g-os_lib.adb (Add_To_Command): use explicit loop to move string into Command, an array conversion is illegal here.

	* g-os_lib.adb (Add_To_Command): use explicit loop to move string
	into Command, an array conversion is illegal here. Uncovered by
	ACATS B460005.

From-SVN: r47435
parent 911b415e
2001-11-29 Ed Schonberg <schonber@gnat.com>
* g-os_lib.adb (Add_To_Command): use explicit loop to move string
into Command, an array conversion is illegal here. Uncovered by
ACATS B460005.
2001/11/28 Geert Bosch <bosch@gnat.com> 2001/11/28 Geert Bosch <bosch@gnat.com>
* init.c: Minor whitespace changes. * init.c: Minor whitespace changes.
......
...@@ -1316,7 +1316,13 @@ package body GNAT.OS_Lib is ...@@ -1316,7 +1316,13 @@ package body GNAT.OS_Lib is
begin begin
Command_Last := Command_Last + S'Length; Command_Last := Command_Last + S'Length;
Command (First .. Command_Last) := Chars (S);
-- Move characters one at a time, because Command has
-- aliased components.
for J in S'Range loop
Command (First + J - S'First) := S (J);
end loop;
Command_Last := Command_Last + 1; Command_Last := Command_Last + 1;
Command (Command_Last) := ASCII.NUL; Command (Command_Last) := ASCII.NUL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment