aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-05-20 07:11:33 +0200
committerMax Kellermann <max@duempel.org>2010-05-20 09:14:11 +0200
commiteda46bc07f8bb557c4d208045a1eca73bc9d5f92 (patch)
tree3372574c2bff9c5b6eb37291aaedd8dfe11de845 /src
parentc727e8698020f69516cb62e001ac6f8254025fe1 (diff)
downloadmpd-eda46bc07f8bb557c4d208045a1eca73bc9d5f92.tar.gz
mpd-eda46bc07f8bb557c4d208045a1eca73bc9d5f92.tar.xz
mpd-eda46bc07f8bb557c4d208045a1eca73bc9d5f92.zip
tag_{id3,ape}: explicitly open files in binary mode
Add the flag "b" to fopen(). Windows compatibility.
Diffstat (limited to '')
-rw-r--r--src/tag_ape.c2
-rw-r--r--src/tag_id3.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/tag_ape.c b/src/tag_ape.c
index 4dfba2ca8..9a07c3ac9 100644
--- a/src/tag_ape.c
+++ b/src/tag_ape.c
@@ -78,7 +78,7 @@ tag_ape_load(const char *file)
unsigned char reserved[8];
} footer;
- fp = fopen(file, "r");
+ fp = fopen(file, "rb");
if (!fp)
return NULL;
diff --git a/src/tag_id3.c b/src/tag_id3.c
index 008eff877..c1302ca86 100644
--- a/src/tag_id3.c
+++ b/src/tag_id3.c
@@ -495,7 +495,7 @@ struct tag *tag_id3_load(const char *file)
struct id3_tag *tag;
FILE *stream;
- stream = fopen(file, "r");
+ stream = fopen(file, "rb");
if (!stream) {
g_debug("tag_id3_load: Failed to open file: '%s', %s",
file, strerror(errno));