@@ -241,14 +241,14 @@ contains
241241 end subroutine s_read_stl
242242
243243 !> This procedure reads an OBJ file.
244- !! @param filepath Path to the odj file.
244+ !! @param filepath Path to the obj file.
245245 !! @param model The obj file.
246246 impure subroutine s_read_obj (filepath , model )
247247
248248 character (LEN=* ), intent (in ) :: filepath
249249 type(t_model), intent (out ) :: model
250250
251- integer :: i, j, k, l, iunit, iostat, nVertices
251+ integer :: i, j, k, l, iv3, iunit, iostat, nVertices
252252
253253 real (wp), dimension (1 :3 ), allocatable :: vertices(:, :)
254254
@@ -297,10 +297,10 @@ contains
297297 read (line(3 :), * ) vertices(i, :)
298298 i = i + 1
299299 case (" f " )
300- read (line(3 :), * ) k, l, j
300+ read (line(3 :), * ) k, l, iv3
301301 model%trs(j)%v(1 , :) = vertices(k, :)
302302 model%trs(j)%v(2 , :) = vertices(l, :)
303- model%trs(j)%v(3 , :) = vertices(j , :)
303+ model%trs(j)%v(3 , :) = vertices(iv3 , :)
304304 j = j + 1
305305 case default
306306 print * , " Error: unknown line type in OBJ file " , filepath
0 commit comments