forked from lix-project/lix
showId: Handle empty attribute names
We should probably disallow these, but until then, we shouldn't barf with an assertion failure. Fixes #738.
This commit is contained in:
parent
338880ee6f
commit
a9faa7bbce
|
@ -30,8 +30,9 @@ static void showString(std::ostream & str, const string & s)
|
||||||
|
|
||||||
static void showId(std::ostream & str, const string & s)
|
static void showId(std::ostream & str, const string & s)
|
||||||
{
|
{
|
||||||
assert(!s.empty());
|
if (s.empty())
|
||||||
if (s == "if")
|
str << "\"\"";
|
||||||
|
else if (s == "if") // FIXME: handle other keywords
|
||||||
str << '"' << s << '"';
|
str << '"' << s << '"';
|
||||||
else {
|
else {
|
||||||
char c = s[0];
|
char c = s[0];
|
||||||
|
|
Loading…
Reference in a new issue