Skip to content

Commit 5d28f9f

Browse files
committed
fix lines overflow
1 parent fedf06b commit 5d28f9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CmsisConfigParser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export function parse(lines: string[]): CmsisConfiguration | undefined {
104104
{
105105
// The Configuration Wizard section must begin within the first 100 lines of code and must start with the following comment line:
106106
// '// <<< Use Configuration Wizard in Context Menu >>>'
107-
for (let idx = 0; idx < 200; idx++) {
107+
for (let idx = 0; idx < Math.min(200, lines.length); idx++) {
108108
const line = lines[idx].toLowerCase();
109109
if (line.indexOf('<<< use configuration wizard in context menu >>>') != -1) {
110110
startIdx = idx;

0 commit comments

Comments
 (0)