#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: softmagic.c,v 1.214 2015/04/09 20:01:41 christos Exp $")
+FILE_RCSID("@(#)$File: softmagic.c,v 1.215 2015/05/21 18:25:29 christos Exp $")
#endif /* lint */
#include "magic.h"
bytecnt = nbytes - offset;
buf = RCAST(const char *, s) + offset;
- end = last = RCAST(const char *, s) + bytecnt;
+ end = last = RCAST(const char *, s) + bytecnt + offset;
/* mget() guarantees buf <= last */
for (lines = linecnt, b = buf; lines && b < end &&
((b = CAST(const char *,
printed_something, need_separator, returnval);
if (rv != 1)
*need_separator = oneed_separator;
- return rv;
+ return 1;
case FILE_NAME:
if (ms->flags & MAGIC_NODESC)