tag_{id3,ape}: explicitly open files in binary mode
Add the flag "b" to fopen(). Windows compatibility.
This commit is contained in:
parent
c727e86980
commit
eda46bc07f
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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));
|
||||||
|
|
Loading…
Reference in New Issue