mirror of https://github.com/aria2/aria2
ftp: Fix accessing first element in empty segments vector
parent
5723f4211a
commit
62826d691d
|
@ -106,7 +106,9 @@ FtpNegotiationCommand::FtpNegotiationCommand
|
||||||
FtpNegotiationCommand::~FtpNegotiationCommand() {}
|
FtpNegotiationCommand::~FtpNegotiationCommand() {}
|
||||||
|
|
||||||
bool FtpNegotiationCommand::executeInternal() {
|
bool FtpNegotiationCommand::executeInternal() {
|
||||||
while(processSequence(getSegments().front()));
|
auto segment = getSegments().empty() ?
|
||||||
|
std::shared_ptr<Segment>() : getSegments().front();
|
||||||
|
while(processSequence(segment));
|
||||||
if(sequence_ == SEQ_RETRY) {
|
if(sequence_ == SEQ_RETRY) {
|
||||||
return prepareForRetry(0);
|
return prepareForRetry(0);
|
||||||
} else if(sequence_ == SEQ_NEGOTIATION_COMPLETED) {
|
} else if(sequence_ == SEQ_NEGOTIATION_COMPLETED) {
|
||||||
|
|
Loading…
Reference in New Issue