mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-15 16:18:22 +01:00
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:
parent
da893cd778
commit
650e24ed1b
@ -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();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user