fix the range of writable cfg to avoid problem

This commit is contained in:
Sijia Chen 2015-08-13 16:01:49 -07:00
parent 0fb5242b86
commit 97351a5cdf

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;