Skip to content

Commit

Permalink
Initialize forcFileInfo(iHRU)%ixFirstHRU to prevent seg fault (on OS X)
Browse files Browse the repository at this point in the history
  • Loading branch information
bartnijssen committed Jul 9, 2015
1 parent 3f40c61 commit ef6fe85
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions build/source/engine/ffile_info.f90
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,10 @@ subroutine ffile_info(nHRU,err,message)
end do ! (looping through files describing each HRU)
! identify the first HRU to use a given data file
do iHRU=1,nHRU
forcFileInfo(iHRU)%ixFirstHRU = 0
do jHRU=1,iHRU-1
if(trim(forcFileInfo(iHRU)%filenmData) == trim(forcFileInfo(jHRU)%filenmData))then
forcFileInfo(iHRU)%ixFirstHRU = jHRU ! index of first HRU to share the same data
else
forcFileInfo(iHRU)%ixFirstHRU = 0
endif
end do
end do
Expand Down

0 comments on commit ef6fe85

Please sign in to comment.