1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-04 04:50:22 +00:00

Merge pull request #404 from SteveMcNeill/main

Increase Sub/Function Id Limit
This commit is contained in:
Steve McNeill 2023-10-30 17:26:51 -04:00 committed by GitHub
commit 36763c89a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 3 deletions

View file

@ -65,3 +65,5 @@ We have a community forum at: https://qb64phoenix.com/forum
We don't currently tweet. Sorry.
Find us on Discord: https://discord.gg/D2M7hepTSx
Join us on Reddit: https://www.reddit.com/r/QB64pe/

View file

@ -930,9 +930,9 @@ DIM id2 AS idstruct
cleanupstringprocessingcall$ = "qbs_cleanup(qbs_tmp_base,"
DIM SHARED sfidlist(1000) AS LONG
DIM SHARED sfarglist(1000) AS INTEGER
DIM SHARED sfelelist(1000) AS INTEGER
REDIM SHARED sfidlist(1000) AS LONG
REDIM SHARED sfarglist(1000) AS INTEGER
REDIM SHARED sfelelist(1000) AS INTEGER
@ -11767,6 +11767,16 @@ FOR i = 1 TO idn
unresolved = unresolved + 1
sflistn = sflistn + 1
IF sflistn > 25000 THEN 'manually set a descriptive error message for the user so they know what's happening.
Error_Message = "ERROR: QB64PE currently limits a program to have a maximum of 25,000 subs and functions, and this limit has been exceeded. Please reduce Sub/Function count, or else report this issue with sample code that produced it over at the QB64PE forums, so we can look further into this issue."
GOTO errmes
END IF
ubound_sf = UBOUND(sfidlist) 'all 3 should have the same limit
IF sflistn > ubound_sf THEN
REDIM _PRESERVE sfidlist(ubound_sf + 1000) AS LONG
REDIM _PRESERVE sfarglist(ubound_sf + 1000) AS INTEGER
REDIM _PRESERVE sfelelist(ubound_sf + 1000) AS INTEGER
END IF
sfidlist(sflistn) = i
sfarglist(sflistn) = i2
sfelelist(sflistn) = nelereq '0 means still unknown