mirror of
https://github.com/maride/afl-transmit.git
synced 2024-11-21 23:14:25 +00:00
Ignore empty lines in peers file
This commit is contained in:
parent
0e770490e3
commit
fbacb2903e
@ -70,6 +70,11 @@ func readPeersFile(path string) error {
|
||||
|
||||
// Iterate over it, line by line
|
||||
for _, line := range strings.Split(readCont, "\n") {
|
||||
// Check if line is usable
|
||||
if len(line) == 0 {
|
||||
// Empty line, ignore
|
||||
continue
|
||||
}
|
||||
// Append newly created peer to array
|
||||
peers = append(peers, CreatePeer(line))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user