Skip to content

fixed error when using non-default ints #592

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 31, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/json_value_module.F90
Original file line number Diff line number Diff line change
Expand Up @@ -11599,7 +11599,9 @@ subroutine json_print_error_message(json,io_unit)
write(io_unit,'(A)',iostat=istat) error_msg
if (istat/=0) then
! in this case, just try to write to the error_unit
call integer_to_string(io_unit,int_fmt,tmp)
! [convert to IK integer, we assume this will be ok since
! normally these io units are default ints]
call integer_to_string(int(io_unit,IK),int_fmt,tmp)
write(error_unit,'(A)',iostat=istat) 'Error writing to unit '//trim(tmp)
write(error_unit,'(A)',iostat=istat) error_msg
end if
Expand Down
Loading