fixed empty string bugs and added tests

git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/branches/class@4168 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
Scott R Charlton 2010-03-18 04:39:55 +00:00
parent da893cd778
commit 650e24ed1b

View File

@ -1752,9 +1752,10 @@ int IPhreeqc::GetDumpLineCount(void)const
const char* IPhreeqc::GetDumpLine(int n)
{
static const char empty[] = "";
if (n < 0 || n >= this->GetDumpLineCount())
{
return 0;
return empty;
}
return this->DumpLines[n].c_str();
}
@ -1766,9 +1767,10 @@ int IPhreeqc::GetErrorLineCount(void)const
const char* IPhreeqc::GetErrorLine(int n)
{
static const char empty[] = "";
if (n < 0 || n >= this->GetErrorLineCount())
{
return 0;
return empty;
}
return this->ErrorLines[n].c_str();
}