summaryrefslogtreecommitdiff
path: root/src/ascmagic.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ascmagic.c')
-rw-r--r--src/ascmagic.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ascmagic.c b/src/ascmagic.c
index 000c9de..78a6dbb 100644
--- a/src/ascmagic.c
+++ b/src/ascmagic.c
@@ -35,7 +35,7 @@
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: ascmagic.c,v 1.85 2012/08/09 16:33:15 christos Exp $")
+FILE_RCSID("@(#)$File: ascmagic.c,v 1.91 2014/11/28 02:46:39 christos Exp $")
#endif /* lint */
#include "magic.h"
@@ -72,7 +72,7 @@ file_ascmagic(struct magic_set *ms, const unsigned char *buf, size_t nbytes,
int text)
{
unichar *ubuf = NULL;
- size_t ulen;
+ size_t ulen = 0;
int rv = 1;
const char *code = NULL;
@@ -147,7 +147,8 @@ file_ascmagic_with_encoding(struct magic_set *ms, const unsigned char *buf,
== NULL)
goto done;
if ((rv = file_softmagic(ms, utf8_buf,
- (size_t)(utf8_end - utf8_buf), TEXTTEST, text)) == 0)
+ (size_t)(utf8_end - utf8_buf), 0, NULL,
+ TEXTTEST, text)) == 0)
rv = -1;
}
@@ -211,6 +212,7 @@ file_ascmagic_with_encoding(struct magic_set *ms, const unsigned char *buf,
case 0:
if (file_printf(ms, ", ") == -1)
goto done;
+ break;
case -1:
goto done;
default: