tag_{id3,ape}: explicitly open files in binary mode

Add the flag "b" to fopen().  Windows compatibility.
This commit is contained in:
Max Kellermann 2010-05-20 07:11:33 +02:00
parent c727e86980
commit eda46bc07f
2 changed files with 2 additions and 2 deletions

View File

@ -78,7 +78,7 @@ tag_ape_load(const char *file)
unsigned char reserved[8]; unsigned char reserved[8];
} footer; } footer;
fp = fopen(file, "r"); fp = fopen(file, "rb");
if (!fp) if (!fp)
return NULL; return NULL;

View File

@ -495,7 +495,7 @@ struct tag *tag_id3_load(const char *file)
struct id3_tag *tag; struct id3_tag *tag;
FILE *stream; FILE *stream;
stream = fopen(file, "r"); stream = fopen(file, "rb");
if (!stream) { if (!stream) {
g_debug("tag_id3_load: Failed to open file: '%s', %s", g_debug("tag_id3_load: Failed to open file: '%s', %s",
file, strerror(errno)); file, strerror(errno));