BPackageInfo::StringBuilder: Fix writing non-string lists
Even a list with only one element needs to be enclosed in {...}.
This commit is contained in:
parent
79d29839bf
commit
690bccd46a
@ -130,21 +130,16 @@ private:
|
||||
// encapsulating the stringification via templates seems to result in
|
||||
// an Internal Compiler Error with gcc 2.
|
||||
|
||||
_Write("{\n", 2);
|
||||
|
||||
int32 count = value.CountItems();
|
||||
if (count == 1) {
|
||||
_WriteListElement(value.ItemAt(0));
|
||||
} else {
|
||||
_Write("{\n", 2);
|
||||
|
||||
int32 count = value.CountItems();
|
||||
for (int32 i = 0; i < count; i++) {
|
||||
_Write('\t');
|
||||
_WriteListElement(value.ItemAt(i));
|
||||
_Write('\n');
|
||||
}
|
||||
|
||||
_Write('}');
|
||||
for (int32 i = 0; i < count; i++) {
|
||||
_Write('\t');
|
||||
_WriteListElement(value.ItemAt(i));
|
||||
_Write('\n');
|
||||
}
|
||||
|
||||
_Write('}');
|
||||
}
|
||||
|
||||
template<typename Value>
|
||||
|
Loading…
Reference in New Issue
Block a user