Fix database getNextRow().

This commit is contained in:
Arthur Britto
2012-05-05 16:45:33 -07:00
parent e55dd7ade6
commit e7c362457e
6 changed files with 33 additions and 38 deletions

View File

@@ -190,7 +190,7 @@ LocalAccountFamily::pointer LocalAccountFamily::readFamily(const NewcoinAddress&
ScopedLock sl(theApp->getWalletDB()->getDBLock());
Database *db=theApp->getWalletDB()->getDB();
if(!db->executeSQL(sql.c_str()) || !db->startIterRows() || !db->getNextRow())
if(!db->executeSQL(sql.c_str()) || !db->startIterRows())
return LocalAccountFamily::pointer();
db->getStr("Comment", comment);
@@ -456,8 +456,7 @@ void Wallet::load()
if(!db->startIterRows()) return;
while(db->getNextRow())
{
do {
std::string strGenerator, strComment;
db->getStr("FamilyGenerator", strGenerator);
@@ -476,7 +475,8 @@ void Wallet::load()
f->setComment(strComment);
}
else assert(false);
}
} while(db->getNextRow());
db->endIterRows();
}