Don't write out zero-byte sections in builder

This and the previous issue caught by Christian Persch in bug #616156
This commit is contained in:
Ryan Lortie 2010-04-19 10:28:44 -04:00
parent 6713b3dbaa
commit 2d9811ebda

View File

@ -236,6 +236,9 @@ file_builder_allocate (FileBuilder *fb,
{
FileChunk *chunk;
if (size == 0)
return NULL;
fb->offset += (-fb->offset) & (alignment - 1);
chunk = g_slice_new (FileChunk);
chunk->offset = fb->offset;