mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-25 11:54:01 +08:00
re PR libfortran/42996 (Incorrect length returned from get_command_argument intrinsic)
2010-02-09 Tobias Burnus <burnus@net-b.de> PR fortran/42996 * intrinsics/args.c (get_command_argument_i4): Always return commandline-argument length for length parameter. From-SVN: r156630
This commit is contained in:
parent
57257f0dd5
commit
e76e92315f
@ -1,3 +1,9 @@
|
||||
2010-02-09 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/42996
|
||||
* intrinsics/args.c (get_command_argument_i4): Always return
|
||||
commandline-argument length for length parameter.
|
||||
|
||||
2010-02-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR libfortran/42742
|
||||
|
@ -147,11 +147,9 @@ get_command_argument_i4 (GFC_INTEGER_4 *number, char *value,
|
||||
if (value != NULL && stat_flag != GFC_GC_FAILURE)
|
||||
{
|
||||
if (arglen > value_len)
|
||||
{
|
||||
arglen = value_len;
|
||||
stat_flag = GFC_GC_VALUE_TOO_SHORT;
|
||||
}
|
||||
memcpy (value, argv[*number], arglen);
|
||||
|
||||
memcpy (value, argv[*number], arglen <= value_len ? arglen : value_len);
|
||||
}
|
||||
|
||||
if (length != NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user