Skip to content

Commit

Permalink
[FIX]add src blank judge
Browse files Browse the repository at this point in the history
  • Loading branch information
randolphcyg committed Mar 18, 2023
1 parent c8f2bb5 commit 09999f2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package parser

import (
"bufio"
"github.com/pkg/errors"
"os"
"reflect"
"strconv"
"strings"

"github.com/pkg/errors"
"github.com/randolphcyg/cpe"
)

Expand Down Expand Up @@ -51,6 +51,10 @@ func (v VInfo) IsVInfoEmpty() bool {
}

func handleVInfoField(src, flagStr string) (string, string, error) {
if src == "" {
return "", "", nil
}

src = strings.TrimSpace(src)
isFlagInSrc := strings.Index(src, flagStr)
if isFlagInSrc == -1 {
Expand Down

0 comments on commit 09999f2

Please sign in to comment.