BencodeParser: fixed parser failure due to the uninitialized variables

pull/25/merge
Tatsuhiro Tsujikawa 2012-07-26 20:42:02 +09:00
parent 8311d6ef87
commit 7176107414
1 changed files with 3 additions and 0 deletions

View File

@ -135,7 +135,10 @@ ssize_t BencodeParser::parseUpdate(const char* data, size_t size)
if(rv < 0) {
return rv;
}
strLength_ = 0;
numConsumed_ = 0;
runBeginCallback(STRUCT_DICT_KEY_T);
currentState_ = BENCODE_STRING_LEN;
// Fall through
}
case BENCODE_STRING_LEN: {