Skip to content

Commit

Permalink
More character strings increased in length.
Browse files Browse the repository at this point in the history
  • Loading branch information
DJDavies2 committed Jun 21, 2024
1 parent 87324ff commit 8857573
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/fckit/module/fckit_C_interop.F90
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ subroutine get_c_commandline_arguments(argc,argv)
use, intrinsic :: iso_c_binding
integer(c_int), intent(out) :: argc
type(c_ptr), intent(inout) :: argv(:)
character(kind=c_char,len=1), save, target :: args(255)
character(kind=c_char,len=255), save, target :: cmd
character(kind=c_char,len=255) :: arg
character(kind=c_char,len=1), save, target :: args(512)
character(kind=c_char,len=512), save, target :: cmd
character(kind=c_char,len=512) :: arg
integer(c_int) :: iarg, arglen, pos, ich, argpos
call get_command(cmd)
do ich=1,len(cmd)
Expand Down Expand Up @@ -195,7 +195,7 @@ function c_ptr_to_string(cptr) result(string)
type(c_ptr), intent(in) :: cptr
character(kind=c_char,len=:), allocatable :: string
character(kind=c_char), dimension(:), pointer :: s
integer(c_int), parameter :: MAX_STR_LEN = 255
integer(c_int), parameter :: MAX_STR_LEN = 512
call c_f_pointer ( cptr , s, (/MAX_STR_LEN/) )
call copy_c_str_to_string( s, string )
end function
Expand Down

0 comments on commit 8857573

Please sign in to comment.