mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-06 03:30:23 +00:00
reorder ubound check
This commit is contained in:
parent
ef875607ff
commit
7420504f42
|
@ -19989,8 +19989,8 @@ SUB RetrieveSearchHistory (SearchHistory() as string)
|
||||||
redim _preserve SearchHistory(1 to 10000) 'large initial array to hold the data
|
redim _preserve SearchHistory(1 to 10000) 'large initial array to hold the data
|
||||||
Do until eof(fh)
|
Do until eof(fh)
|
||||||
ln = ln + 1
|
ln = ln + 1
|
||||||
line input #fh, SearchHistory(ln)
|
|
||||||
if ln > ubound(SearchHistory) then redim _preserve SearhHistory(1 to ln + 10000) 'large resize, it necessary
|
if ln > ubound(SearchHistory) then redim _preserve SearhHistory(1 to ln + 10000) 'large resize, it necessary
|
||||||
|
line input #fh, SearchHistory(ln)
|
||||||
Loop
|
Loop
|
||||||
redim _preserve SearchHistory(1 to ln) 'resize to proper size before exit
|
redim _preserve SearchHistory(1 to ln) 'resize to proper size before exit
|
||||||
CLOSE #fh
|
CLOSE #fh
|
||||||
|
|
Loading…
Reference in a new issue