Fixed a couple of crashes
This was SVN commit r851.
This commit is contained in:
parent
2c23606c31
commit
741699190a
@ -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);
|
||||
|
||||
{
|
||||
it = m_Words.erase(it);
|
||||
}
|
||||
else
|
||||
{
|
||||
last_word = *it;
|
||||
++it;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ public:
|
||||
* In [B=Hello][/B]
|
||||
* m_TagValue is 'Hello'
|
||||
*/
|
||||
CStr m_TagValue;
|
||||
std::string m_TagValue;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user