aboutsummaryrefslogtreecommitdiffstats
path: root/src/player.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/player.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/player.c b/src/player.c
index 57ed1f2ef..25dbe777f 100644
--- a/src/player.c
+++ b/src/player.c
@@ -303,8 +303,8 @@ char *getPlayerErrorStr(void)
int errorlen = MAXPATHLEN + 1024;
PlayerControl *pc = &(getPlayerData()->playerControl);
- error = xrealloc(error, errorlen + 1);
- memset(error, 0, errorlen + 1);
+ error = xrealloc(error, errorlen);
+ error[0] = '\0';
switch (pc->error) {
case PLAYER_ERROR_FILENOTFOUND: