Skip to content

Commit 5f98d14

Browse files
royqh1979@gmail.comroyqh1979@gmail.com
royqh1979@gmail.com
authored and
royqh1979@gmail.com
committed
- fix: parse error when double quotes not correctly closed
- fix: parse error when single quotes not correctly closed
1 parent 78975da commit 5f98d14

File tree

3 files changed

+30
-22
lines changed

3 files changed

+30
-22
lines changed

NEWS.txt

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Version 6.7.6
2+
3+
- fix: parse error when double quotes not correctly closed
4+
- fix: parse error when single quotes not correctly closed
5+
16
Version 6.7.5 AUGUST 2021
27

38
- add: blend mode for debug cpu window

Source/VCL/ClassBrowsing/CppTokenizer.pas

+6-3
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ procedure TCppTokenizer.SkipRawString;
254254
')': noEscape:=False;
255255
end;
256256
until (pCurrent^ = #0) or ( (pCurrent^ = '"') and (not noEscape));
257-
Inc(pCurrent);
257+
if (pCurrent^ <> #0) then
258+
Inc(pCurrent);
258259
end;
259260

260261
procedure TCppTokenizer.SkipDoubleQuotes;
@@ -266,7 +267,8 @@ procedure TCppTokenizer.SkipDoubleQuotes;
266267
else
267268
Inc(pCurrent);
268269
end;
269-
Inc(pCurrent);
270+
if (pCurrent^ <> #0) then
271+
Inc(pCurrent);
270272
end;
271273

272274
procedure TCppTokenizer.SkipSingleQuote;
@@ -276,7 +278,8 @@ procedure TCppTokenizer.SkipSingleQuote;
276278
if pCurrent^ = '\' then
277279
Inc(pCurrent, 2); // skip escaped quote
278280
until pCurrent^ in ['''', #0];
279-
Inc(pCurrent);
281+
if (pCurrent^ <> #0) then
282+
Inc(pCurrent);
280283
end;
281284

282285
procedure TCppTokenizer.SkipPair(cStart, cEnd: Char; FailChars: TSysCharSet); // e.g.: SkipPair('[', ']');

Source/main.dfm

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
object MainForm: TMainForm
2-
Left = 597
3-
Top = 312
2+
Left = 337
3+
Top = 216
44
HorzScrollBar.Visible = False
55
VertScrollBar.Visible = False
66
AutoScroll = False
@@ -71,7 +71,7 @@ object MainForm: TMainForm
7171
Left = 0
7272
Top = 0
7373
Width = 976
74-
Height = 196
74+
Height = 190
7575
Align = alClient
7676
BevelOuter = bvNone
7777
BorderStyle = bsNone
@@ -116,7 +116,7 @@ object MainForm: TMainForm
116116
Left = 0
117117
Top = 0
118118
Width = 976
119-
Height = 196
119+
Height = 190
120120
Align = alClient
121121
BevelOuter = bvNone
122122
BorderStyle = bsNone
@@ -161,13 +161,13 @@ object MainForm: TMainForm
161161
Left = 0
162162
Top = 0
163163
Width = 192
164-
Height = 196
164+
Height = 190
165165
Align = alLeft
166166
BevelOuter = bvNone
167167
TabOrder = 0
168168
DesignSize = (
169169
192
170-
196)
170+
190)
171171
object btnAbortCompilation: TSpeedButton
172172
Left = 5
173173
Top = 5
@@ -213,14 +213,14 @@ object MainForm: TMainForm
213213
Left = 192
214214
Top = 0
215215
Width = 784
216-
Height = 196
216+
Height = 190
217217
Align = alClient
218218
BevelOuter = bvNone
219219
TabOrder = 1
220220
object LogOutput: TMemo
221221
Left = 0
222222
Top = 0
223-
Width = 875
223+
Width = 784
224224
Height = 190
225225
Align = alClient
226226
Font.Charset = DEFAULT_CHARSET
@@ -245,13 +245,13 @@ object MainForm: TMainForm
245245
Left = 450
246246
Top = 0
247247
Width = 8
248-
Height = 196
248+
Height = 190
249249
end
250250
object DebugViews: TPageControl
251251
Left = 458
252252
Top = 0
253253
Width = 518
254-
Height = 196
254+
Height = 190
255255
ActivePage = DebugConsoleSheet
256256
Align = alClient
257257
PopupMenu = LocalPopup
@@ -264,15 +264,15 @@ object MainForm: TMainForm
264264
Left = 0
265265
Top = 0
266266
Width = 510
267-
Height = 165
267+
Height = 159
268268
Align = alClient
269269
BevelOuter = bvNone
270270
TabOrder = 0
271271
object DebugOutput: TDevConsole
272272
Left = 0
273273
Top = 0
274274
Width = 510
275-
Height = 165
275+
Height = 159
276276
Align = alClient
277277
BevelInner = bvNone
278278
BevelOuter = bvNone
@@ -291,7 +291,7 @@ object MainForm: TMainForm
291291
Left = 0
292292
Top = 0
293293
Width = 510
294-
Height = 165
294+
Height = 159
295295
Cursor = crHandPoint
296296
Align = alClient
297297
BevelInner = bvNone
@@ -329,7 +329,7 @@ object MainForm: TMainForm
329329
Left = 0
330330
Top = 0
331331
Width = 510
332-
Height = 165
332+
Height = 159
333333
Cursor = crHandPoint
334334
Align = alClient
335335
BevelInner = bvNone
@@ -388,7 +388,7 @@ object MainForm: TMainForm
388388
Left = 0
389389
Top = 0
390390
Width = 450
391-
Height = 196
391+
Height = 190
392392
Align = alLeft
393393
BevelOuter = bvNone
394394
Constraints.MinWidth = 28
@@ -397,13 +397,13 @@ object MainForm: TMainForm
397397
Left = 0
398398
Top = 0
399399
Width = 450
400-
Height = 196
400+
Height = 190
401401
Align = alClient
402402
BevelOuter = bvNone
403403
TabOrder = 0
404404
DesignSize = (
405405
450
406-
196)
406+
190)
407407
object lblEvaluate: TLabel
408408
Left = 5
409409
Top = 6
@@ -438,7 +438,7 @@ object MainForm: TMainForm
438438
Left = 0
439439
Top = 68
440440
Width = 450
441-
Height = 128
441+
Height = 122
442442
Align = alBottom
443443
Anchors = [akLeft, akTop, akRight, akBottom]
444444
BevelOuter = bvNone
@@ -465,7 +465,7 @@ object MainForm: TMainForm
465465
Left = 0
466466
Top = 0
467467
Width = 976
468-
Height = 196
468+
Height = 190
469469
Align = alClient
470470
Indent = 22
471471
TabOrder = 0

0 commit comments

Comments
 (0)