mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-01 13:50:36 +00:00
Patch to fix WriteConfigSetting from altering variables passed to it.
Fix to precompiler internal array allocation to prevent IDE Module Errors in some instances.
This commit is contained in:
parent
c5a7d9c5b7
commit
15649725e5
|
@ -113,6 +113,7 @@ IF ideerror THEN
|
|||
IF ideerror = 2 THEN ideerrormessage "File not found"
|
||||
IF ideerror = 3 THEN ideerrormessage "File access error": CLOSE #150
|
||||
IF ideerror = 4 THEN ideerrormessage "Path not found"
|
||||
ideerrormessage str$(err) + "on line "+ str$(_errorline)
|
||||
END IF
|
||||
ideerror = 1 'unknown IDE error
|
||||
|
||||
|
@ -6263,6 +6264,9 @@ FOR y = 0 TO (idewy - 9)
|
|||
ELSEIF inquote OR MID$(a2$, m, 1) = CHR$(34) THEN
|
||||
COLOR 14
|
||||
END IF
|
||||
DO UNTIL l < UBOUND(InValidLine) 'make certain we have enough InValidLine elements to cover us in case someone scrolls QB64
|
||||
REDIM _PRESERVE InValidLine(UBOUND(InValidLine) + 1000) AS _BIT ' to the end of a program before the IDE has finished
|
||||
LOOP ' verifying the code and growing the array during the IDE passes.
|
||||
If InValidLine(l) and 1 then color 7
|
||||
|
||||
LOCATE y + 3, 2 + m - 1
|
||||
|
|
|
@ -1353,7 +1353,7 @@ subfunc = ""
|
|||
SelectCaseCounter = 0
|
||||
ExecCounter = 0
|
||||
UserDefineCount = 6
|
||||
REDIM SHARED InValidLine(10000) AS _BIT
|
||||
|
||||
|
||||
''create a type for storing memory blocks
|
||||
''UDT
|
||||
|
@ -1509,7 +1509,9 @@ DO
|
|||
|
||||
linenumber = linenumber + 1
|
||||
|
||||
IF linenumber > UBOUND(InValidLine) THEN REDIM _PRESERVE InValidLine(UBOUND(InValidLine) + 1000) AS _BIT 'color information flag for each line
|
||||
DO UNTIL linenumber < UBOUND(InValidLine) 'color information flag for each line
|
||||
REDIM _PRESERVE InValidLine(UBOUND(InValidLine) + 1000) AS _BIT
|
||||
LOOP
|
||||
InValidLine(linenumber) = 0
|
||||
|
||||
IF LEN(wholeline$) THEN
|
||||
|
@ -1638,7 +1640,10 @@ DO
|
|||
|
||||
|
||||
IF ExecLevel(ExecCounter) THEN
|
||||
IF linenumber > UBOUND(InValidLine) THEN REDIM _PRESERVE InValidLine(UBOUND(InValidLine) + 10000) AS _BIT
|
||||
DO UNTIL linenumber < UBOUND(InValidLine)
|
||||
REDIM _PRESERVE InValidLine(UBOUND(InValidLine) + 1000) AS _BIT
|
||||
LOOP
|
||||
|
||||
InValidLine(linenumber) = -1
|
||||
GOTO finishedlinepp 'we don't check for anything inside lines that we've marked for skipping
|
||||
END IF
|
||||
|
@ -24097,7 +24102,8 @@ LOOP
|
|||
StrReplace$ = a$
|
||||
END FUNCTION
|
||||
|
||||
SUB WriteConfigSetting (heading$, item$, value$)
|
||||
SUB WriteConfigSetting (heading$, item$, tvalue$)
|
||||
value$ = tvalue$
|
||||
SHARED ConfigFile$, ConfigBak$
|
||||
|
||||
InFile = FREEFILE: OPEN ConfigFile$ FOR BINARY AS #InFile
|
||||
|
|
Loading…
Reference in a new issue