diff --git a/src/server/xml.cpp b/src/server/xml.cpp index c630b2fa0..2c604cea5 100755 --- a/src/server/xml.cpp +++ b/src/server/xml.cpp @@ -104,8 +104,8 @@ void WriteXmlString(wxOutputStream& outf, const wxChar* str) if (c < 0 || c > 'z' || strchr("<>/&", c) != NULL) { unsigned int n = (unsigned char)c; - char str[8]; sprintf(str, "&#%02X;", n); - outf << str; + char s[8]; sprintf(s, "&#%02X;", n); + outf << s; } else outf << c; @@ -253,7 +253,8 @@ wxString TXmlItem::GetWord(wxInputStream& inf) const int TXmlItem::ReadTag(wxInputStream& inf) { - wxString str = GetWord(inf); + wxString str = GetWord(inf); + if (str.IsEmpty()) return -1; @@ -307,7 +308,7 @@ int TXmlItem::ReadTag(wxInputStream& inf) } // Ho letto un nome di attributo - wxString str = GetWord(inf); + str = GetWord(inf); if (str.IsEmpty() || str[0u] != '=') break; // Leggo il valore dell'attributo