mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
Fix allocation logic for allocatable array sw.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8436 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
0eedbf3f41
commit
2746af1581
@ -7,10 +7,10 @@ subroutine plotsave(swide,nw,nh,irow)
|
|||||||
|
|
||||||
if(irow.eq.-99) then
|
if(irow.eq.-99) then
|
||||||
if(allocated(sw)) deallocate(sw)
|
if(allocated(sw)) deallocate(sw)
|
||||||
return
|
go to 900
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if(nw.ne.nw0 .or. nh.ne.nh0) then
|
if(nw.ne.nw0 .or. nh.ne.nh0 .or. (.not.allocated(sw))) then
|
||||||
if(allocated(sw)) deallocate(sw)
|
if(allocated(sw)) deallocate(sw)
|
||||||
! if(nw0.ne.-1) deallocate(sw)
|
! if(nw0.ne.-1) deallocate(sw)
|
||||||
allocate(sw(0:nw-1,0:nh-1))
|
allocate(sw(0:nw-1,0:nh-1))
|
||||||
@ -18,7 +18,6 @@ subroutine plotsave(swide,nw,nh,irow)
|
|||||||
nw0=nw
|
nw0=nw
|
||||||
nh0=nh
|
nh0=nh
|
||||||
endif
|
endif
|
||||||
|
|
||||||
df=12000.0/16384
|
df=12000.0/16384
|
||||||
if(irow.lt.0) then
|
if(irow.lt.0) then
|
||||||
! Push a new row of data into sw
|
! Push a new row of data into sw
|
||||||
@ -31,5 +30,5 @@ subroutine plotsave(swide,nw,nh,irow)
|
|||||||
swide=sw(0:nw-1,irow)
|
swide=sw(0:nw-1,irow)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
return
|
900 return
|
||||||
end subroutine plotsave
|
end subroutine plotsave
|
||||||
|
Loading…
Reference in New Issue
Block a user