Merge pull request #2072 from sijchen/fix_readcfg

[Encoder] fix the range of writable cfg to avoid problem
This commit is contained in:
HaiboZhu 2015-08-14 08:58:22 +08:00
commit c0808f1f1d

View File

@ -105,7 +105,7 @@ long CReadConfig::ReadLine (std::string* pVal, const int kiValSize/* = 4*/) {
bCommentFlag = true;
if (!bCommentFlag) {
if (kCh == '\t' || kCh == ' ') {
if (nTagNum >= kiValSize)
if (nTagNum >= kiValSize-1)
break;
if (! (*strTags).empty()) {
++ nTagNum;