Skip to content

Commit 13a7b1b

Browse files
committed
Clone list before changing it by append
1 parent e548e10 commit 13a7b1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/arduino/builder/internal/detector/detector.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ func (l *SketchLibrariesDetector) gccPreprocessTask(sourceFile *sourceFile, buil
355355
// search path, but only for the source code of the library, so we temporary
356356
// copy the current search path list and add the library' utility directory
357357
// if needed.
358-
includeFolders := l.includeFolders
358+
includeFolders := l.includeFolders.Clone()
359359
if extraInclude := sourceFile.ExtraIncludePath; extraInclude != nil {
360360
includeFolders = append(includeFolders, extraInclude)
361361
}

0 commit comments

Comments
 (0)