зеркало из https://github.com/mozilla/pjs.git
Bug 513832: Initialize 'state' before passing it to ParseFTPList(),
and pass the same 'state' to subsequent ParseFTPList() calls. sr=bzbarsky.
This commit is contained in:
Родитель
71bd25563e
Коммит
4cecc7242a
|
@ -283,6 +283,9 @@ nsFTPDirListingConv::DigestBufferLines(char *aBuffer, nsCString &aString) {
|
|||
char *eol;
|
||||
PRBool cr = PR_FALSE;
|
||||
|
||||
list_state state;
|
||||
state.magic = 0;
|
||||
|
||||
// while we have new lines, parse 'em into application/http-index-format.
|
||||
while ( line && (eol = PL_strchr(line, nsCRT::LF)) ) {
|
||||
// yank any carriage returns too.
|
||||
|
@ -295,7 +298,6 @@ nsFTPDirListingConv::DigestBufferLines(char *aBuffer, nsCString &aString) {
|
|||
cr = PR_FALSE;
|
||||
}
|
||||
|
||||
list_state state;
|
||||
list_result result;
|
||||
|
||||
int type = ParseFTPList(line, &state, &result );
|
||||
|
|
Загрузка…
Ссылка в новой задаче