recipes: tools/util-linux*: upgraded to version 2.33.1
[dragora.git] / patches / libid3tag / libid3tag-0.15.1b-id3v1-zero-padding.patch
blobfdda08410b3b059735d91ec6e5a42a5d8c721ad3
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 10_id3v1_zeropadding.dpatch by <sm17hs@gmail.com>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: Use zero padding instead of space padding for ID3V1 fields
6 ## DP: (as requested by http://id3lib.sourceforge.net/id3/id3v1.html).
8 @DPATCH@
9 diff -urNad libid3tag-0.15.1b~/render.c libid3tag-0.15.1b/render.c
10 --- libid3tag-0.15.1b~/render.c 2004-01-23 10:41:32.000000000 +0100
11 +++ libid3tag-0.15.1b/render.c 2009-11-09 17:17:48.000000000 +0100
12 @@ -183,18 +183,16 @@
13 end = data + length;
15 if (ucs4) {
16 - while (*ucs4 && end - data > 0) {
17 + while (*ucs4 && end - data > 0)
18 *data++ = *ucs4++;
20 - if (data[-1] == '\n')
21 - data[-1] = ' ';
22 - }
25 - while (end - data > 0)
26 - *data++ = ' ';
28 *data = 0;
30 - return id3_latin1_serialize(ptr, padded, 0);
31 + id3_latin1_serialize(ptr, padded, 0);
33 + if (end - data > 0)
34 + id3_render_padding(ptr, 0, end - data);
36 + return length;