mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-09-20 03:14:45 +00:00
Fix off-by-one error with ending quote addition
The math here is wrong, it accounts for the extra quote when doing `- 2`, but obviously that quote is not there in this situation so it should just be `- 1`. The result of the current logic is that it cuts off the last character of the string.
This commit is contained in:
parent
2693733b37
commit
ccfd5f53d3
1 changed files with 1 additions and 1 deletions
|
@ -19885,7 +19885,7 @@ FUNCTION lineformat$ (a$)
|
|||
'----------------quoted string----------------
|
||||
IF c = 34 THEN '"
|
||||
endingquote = INSTR(i + 1, ca$, CHR$(34))
|
||||
IF endingquote = 0 THEN endingquote = n - 2
|
||||
IF endingquote = 0 THEN endingquote = n - 1
|
||||
|
||||
a2$ = a2$ + sp + createElementString$(MID$(ca$, i + 1, endingquote - 1 - i))
|
||||
i = endingquote + 1
|
||||
|
|
Loading…
Reference in a new issue