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 = 2 THEN ideerrormessage "File not found"
|
||||||
IF ideerror = 3 THEN ideerrormessage "File access error": CLOSE #150
|
IF ideerror = 3 THEN ideerrormessage "File access error": CLOSE #150
|
||||||
IF ideerror = 4 THEN ideerrormessage "Path not found"
|
IF ideerror = 4 THEN ideerrormessage "Path not found"
|
||||||
|
ideerrormessage str$(err) + "on line "+ str$(_errorline)
|
||||||
END IF
|
END IF
|
||||||
ideerror = 1 'unknown IDE error
|
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
|
ELSEIF inquote OR MID$(a2$, m, 1) = CHR$(34) THEN
|
||||||
COLOR 14
|
COLOR 14
|
||||||
END IF
|
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
|
If InValidLine(l) and 1 then color 7
|
||||||
|
|
||||||
LOCATE y + 3, 2 + m - 1
|
LOCATE y + 3, 2 + m - 1
|
||||||
|
|
|
@ -1353,7 +1353,7 @@ subfunc = ""
|
||||||
SelectCaseCounter = 0
|
SelectCaseCounter = 0
|
||||||
ExecCounter = 0
|
ExecCounter = 0
|
||||||
UserDefineCount = 6
|
UserDefineCount = 6
|
||||||
REDIM SHARED InValidLine(10000) AS _BIT
|
|
||||||
|
|
||||||
''create a type for storing memory blocks
|
''create a type for storing memory blocks
|
||||||
''UDT
|
''UDT
|
||||||
|
@ -1509,7 +1509,9 @@ DO
|
||||||
|
|
||||||
linenumber = linenumber + 1
|
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
|
InValidLine(linenumber) = 0
|
||||||
|
|
||||||
IF LEN(wholeline$) THEN
|
IF LEN(wholeline$) THEN
|
||||||
|
@ -1638,7 +1640,10 @@ DO
|
||||||
|
|
||||||
|
|
||||||
IF ExecLevel(ExecCounter) THEN
|
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
|
InValidLine(linenumber) = -1
|
||||||
GOTO finishedlinepp 'we don't check for anything inside lines that we've marked for skipping
|
GOTO finishedlinepp 'we don't check for anything inside lines that we've marked for skipping
|
||||||
END IF
|
END IF
|
||||||
|
@ -24097,7 +24102,8 @@ LOOP
|
||||||
StrReplace$ = a$
|
StrReplace$ = a$
|
||||||
END FUNCTION
|
END FUNCTION
|
||||||
|
|
||||||
SUB WriteConfigSetting (heading$, item$, value$)
|
SUB WriteConfigSetting (heading$, item$, tvalue$)
|
||||||
|
value$ = tvalue$
|
||||||
SHARED ConfigFile$, ConfigBak$
|
SHARED ConfigFile$, ConfigBak$
|
||||||
|
|
||||||
InFile = FREEFILE: OPEN ConfigFile$ FOR BINARY AS #InFile
|
InFile = FREEFILE: OPEN ConfigFile$ FOR BINARY AS #InFile
|
||||||
|
|
Loading…
Reference in a new issue