Skip to content

Commit fe33b00

Browse files
committed
ensure json_parse return null pointer if the file is not found.
minor commenting updates.
1 parent 64974a3 commit fe33b00

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/json_module.f90

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3608,7 +3608,7 @@ subroutine json_parse(file, p, unit)
36083608
character(len=10) :: line_str, char_str
36093609
logical :: is_open
36103610

3611-
!clean any exceptions and initialize:
3611+
!clear any exceptions and initialize:
36123612
call json_initialize()
36133613

36143614
if (present(unit)) then
@@ -3684,6 +3684,7 @@ subroutine json_parse(file, p, unit)
36843684
else
36853685

36863686
call throw_exception('Error in json_parse: Error opening file: '//trim(file))
3687+
nullify(p)
36873688

36883689
end if
36893690

@@ -3953,7 +3954,7 @@ end subroutine json_create_double
39533954
!****f* json_module/json_create_string
39543955
!
39553956
! NAME
3956-
! json_create_integer
3957+
! json_create_string
39573958
!
39583959
! DESCRIPTION
39593960
! Allocate a json_value pointer and make it a string variable.

0 commit comments

Comments
 (0)