1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-06-29 11:40:38 +00:00

Fixes warning dialog showing weird characters.

This commit is contained in:
Fellippe Heitor 2021-02-09 17:27:40 -03:00
parent e5f8aa23ce
commit 7492260746
2 changed files with 6 additions and 10 deletions

View file

@ -9242,7 +9242,7 @@ FUNCTION idewarningbox
warningIncLevel = CVL(MID$(warning$(x), 5, 4))
IF warningIncLevel > 0 THEN
warningIncLines(x) = CVL(MID$(warning$(x), 9, 4))
warningIncFiles(x) = MID$(warning$(x), 13, INSTR(warning$(x), CHR$(2)) - 13)
warningIncFiles(x) = MID$(warning$(x), 13, INSTR(warning$(x), CHR$(255)) - 13)
IF LEN(warningIncFiles(x)) > maxModuleNameLen THEN
maxModuleNameLen = LEN(warningIncFiles(x))
END IF
@ -9252,7 +9252,7 @@ FUNCTION idewarningbox
'build list
FOR x = 1 TO warningListItems
IF warningLines(x) = 0 THEN
l$ = l$ + MID$(warning$(x), INSTR(warning$(x), CHR$(2)) + 1)
l$ = l$ + MID$(warning$(x), INSTR(warning$(x), CHR$(255)) + 1)
IF x > 1 THEN ASC(l$, treeConnection) = 192
ELSE
l3$ = CHR$(16) + CHR$(2) 'dark grey
@ -9266,7 +9266,7 @@ FUNCTION idewarningbox
l3$ = l3$ + thisprog$ + SPACE$(maxModuleNameLen - LEN(thisprog$)) + ":" + CHR$(16) + CHR$(16) + num$
END IF
treeConnection = LEN(l$) + 1
text$ = MID$(warning$(x), INSTR(warning$(x), CHR$(2)) + 1)
text$ = MID$(warning$(x), INSTR(warning$(x), CHR$(255)) + 1)
IF LEN(text$) THEN
l$ = l$ + CHR$(195) + CHR$(196) + l3$ + ": " + text$
ELSE

View file

@ -11846,10 +11846,6 @@ IF idemode = 0 AND NOT QuietMode THEN
END IF
END IF
'OPEN "unusedVariableList.txt" FOR OUTPUT AS #1: CLOSE #1
'OPEN "unusedVariableList.txt" FOR BINARY AS #1
'PUT #1, 1, usedVariableList$ 'warning$(1)
'CLOSE #1
IF NOT IgnoreWarnings THEN
totalUnusedVariables = 0
FOR i = 1 TO totalVariablesCreated
@ -25462,16 +25458,16 @@ SUB addWarning (whichLineNumber AS LONG, includeLevel AS LONG, incLineNumber AS
IF lastWarningHeader <> header$ THEN
lastWarningHeader = header$
GOSUB increaseWarningCount
warning$(warningListItems) = MKL$(0) + CHR$(2) + header$
warning$(warningListItems) = MKL$(0) + CHR$(255) + header$
END IF
GOSUB increaseWarningCount
IF includeLevel > 0 THEN
thisincname$ = getfilepath$(incFileName$)
thisincname$ = MID$(incFileName$, LEN(thisincname$) + 1)
warning$(warningListItems) = MKL$(whichLineNumber) + MKL$(includeLevel) + MKL$(incLineNumber) + thisincname$ + CHR$(2) + text$
warning$(warningListItems) = MKL$(whichLineNumber) + MKL$(includeLevel) + MKL$(incLineNumber) + thisincname$ + CHR$(255) + text$
ELSE
warning$(warningListItems) = MKL$(whichLineNumber) + MKL$(0) + CHR$(2) + text$
warning$(warningListItems) = MKL$(whichLineNumber) + MKL$(0) + CHR$(255) + text$
END IF
END IF
END IF