Add a comment explaining why we have to check for an extra \n
This commit is contained in:
parent
32da885a91
commit
958ac18d4e
@ -47,7 +47,9 @@ extern char get_header_ar(archive_handle_t *archive_handle)
|
|||||||
return(EXIT_FAILURE);
|
return(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Some ar entries have a trailing '\n' after the previous data entry */
|
/* ar header starts on an even byte (2 byte aligned)
|
||||||
|
* '\n' is used for padding
|
||||||
|
*/
|
||||||
if (ar.raw[0] == '\n') {
|
if (ar.raw[0] == '\n') {
|
||||||
/* fix up the header, we started reading 1 byte too early */
|
/* fix up the header, we started reading 1 byte too early */
|
||||||
memmove(ar.raw, &ar.raw[1], 59);
|
memmove(ar.raw, &ar.raw[1], 59);
|
||||||
|
Loading…
Reference in New Issue
Block a user