From: Christos Zoulas Date: Fri, 28 Apr 2017 16:27:58 +0000 (+0000) Subject: Support 'alternate' printf format. X-Git-Tag: FILE5_31~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a2f8f6fa35982f358d8bcbb77ba223d5ad50623e;p=file Support 'alternate' printf format. --- diff --git a/src/apprentice.c b/src/apprentice.c index 715ec82d..f8f2e178 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -32,7 +32,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: apprentice.c,v 1.258 2017/02/10 18:14:01 christos Exp $") +FILE_RCSID("@(#)$File: apprentice.c,v 1.260 2017/04/28 16:27:58 christos Exp $") #endif /* lint */ #include "magic.h" @@ -2356,6 +2356,8 @@ check_format_type(const char *ptr, int type, const char **estr) ptr++; if (*ptr == '.') ptr++; + if (*ptr == '#') + ptr++; #define CHECKLEN() do { \ for (len = cnt = 0; isdigit((unsigned char)*ptr); ptr++, cnt++) \ len = len * 10 + (*ptr - '0'); \