1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

AIFF comment format fix.

This commit is contained in:
jules 2013-01-08 18:23:10 +00:00
parent 6fb9b9ce4e
commit 417f9eb31c

View file

@ -225,7 +225,10 @@ namespace AiffFileHelpers
out.writeShortBigEndian ((short) values.getValue (prefix + "Identifier", "0").getIntValue());
const String comment (values.getValue (prefix + "Text", String::empty));
out.write (comment.toUTF8(), jmin (comment.getNumBytesAsUTF8(), 65534));
const int commentLength = jmin (comment.getNumBytesAsUTF8(), 65534);
out.writeShortBigEndian ((short) commentLength + 1);
out.write (comment.toUTF8(), commentLength);
out.writeByte (0);
if ((out.getDataSize() & 1) != 0)