Skip to content

Commit c2dd715

Browse files
committed
Concatenate with c_null_char
1 parent 56d9b0b commit c2dd715

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/stdlib_io_zip.f90

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module stdlib_io_zip
22
use stdlib_io_minizip
3-
use iso_c_binding, only: c_ptr, c_associated, c_int, c_long, c_char
3+
use iso_c_binding, only: c_ptr, c_associated, c_int, c_long, c_char, c_null_char, c_null_ptr
44
implicit none
55
private
66

@@ -47,7 +47,9 @@ module subroutine unzip_to_bundle(filename, bundle, iostat, iomsg)
4747

4848
if (present(iostat)) iostat = 0
4949

50-
file_handle = unz_open(filename)
50+
file_handle = c_null_ptr
51+
52+
file_handle = unz_open(filename//c_null_char)
5153
if (.not. c_associated(file_handle)) then
5254
if (present(iostat)) iostat = 1
5355
if (present(iomsg)) iomsg = 'Failed to open file '//trim(filename)//'.'

0 commit comments

Comments
 (0)