We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ef49eb7 commit a38e7bdCopy full SHA for a38e7bd
legacy/builder/ctags/ctags_parser.go
@@ -263,9 +263,11 @@ func toCompilerCmdLine (define string) string {
263
// transforms ` A ` to `-DA`
264
elts := strings.SplitAfterN(define, "=", 2)
265
ret := ""
266
- if len(elts) > 0 {
267
- ret += "-D"+strings.TrimSpace(elts[0][:len(elts[0])-1])
268
- if len(elts) > 1 {
+ eltsLength := len(elts)
+ if eltsLength > 0 {
+ equalsLength := eltsLength - 1
269
+ ret += "-D"+strings.TrimSpace(elts[0][:len(elts[0])-equalsLength])
270
+ if equalsLength > 0 {
271
ret += "="+strings.TrimSpace(elts[1])
272
}
273
0 commit comments