Fixed a couple of crashes

This was SVN commit r851.
This commit is contained in:
Ykkrosh 2004-07-31 11:28:24 +00:00
parent 2c23606c31
commit 741699190a
2 changed files with 11 additions and 6 deletions

View File

@ -300,7 +300,7 @@ void CGUIString::SetValue(const CStr& str)
{
// Check for possible value-strings
if (Line.GetArgCount() == 2)
Line.GetArgString(1, (std::string &)tag.m_TagValue);
Line.GetArgString(1, tag.m_TagValue);
// Finalize last
if (curpos != from_nonraw)
@ -478,11 +478,16 @@ void CGUIString::SetValue(const CStr& str)
// Remove duplicates
vector<int>::iterator it;
int last_word = -1;
for (it = m_Words.begin(); it != m_Words.end(); ++it)
for (it = m_Words.begin(); it != m_Words.end(); )
{
if (last_word == *it)
m_Words.erase(it);
last_word = *it;
{
it = m_Words.erase(it);
}
else
{
last_word = *it;
++it;
}
}
}

View File

@ -199,7 +199,7 @@ public:
* In [B=Hello][/B]
* m_TagValue is 'Hello'
*/
CStr m_TagValue;
std::string m_TagValue;
};
/**