1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-28 02:30:05 +00:00

Fix for XML formatting.

This commit is contained in:
jules 2012-03-09 21:13:08 +00:00
parent 431978b4ff
commit b56695f604
2 changed files with 5 additions and 1 deletions

View file

@ -119,6 +119,8 @@ bool FileOutputStream::write (const void* const src, const int numBytes)
void FileOutputStream::writeRepeatedByte (uint8 byte, int numBytes)
{
jassert (numBytes >= 0);
if (bytesInBuffer + numBytes < bufferSize)
{
memset (buffer + bytesInBuffer, byte, (size_t) numBytes);

View file

@ -219,7 +219,9 @@ void XmlElement::writeElementAsText (OutputStream& outputStream,
const int lineWrapLength) const
{
using namespace XmlOutputFunctions;
writeSpaces (outputStream, indentationLevel);
if (indentationLevel >= 0)
writeSpaces (outputStream, indentationLevel);
if (! isTextElement())
{