commit 09e12de1d091d497f517174e11ccac7d8f753825
parent 9cac4228a3ad284de64ce1d3d7e24bd383f9e8bf
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Thu, 19 Nov 2020 18:54:02 +0100
Fix an err msg that was not printed by the logger
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/htcp.c b/src/htcp.c
@@ -89,6 +89,7 @@ log_err(const struct htcp* htcp, const char* msg, ...)
static void
reset_htcp(struct htcp* htcp)
{
+ ASSERT(htcp);
htcp->pagesize = 0;
htcp->irregular_z = 0;
htcp->definition[0] = 0;
@@ -125,7 +126,7 @@ load_stream(struct htcp* htcp, FILE* stream, const char* stream_name)
#define READ(Var, N, Name) { \
if(fread((Var), sizeof(*(Var)), (N), stream) != (N)) { \
- fprintf(stderr, "%s: could not read the %s\n", stream_name, Name); \
+ log_err(htcp, "%s: could not read the %s\n", stream_name, Name); \
res = RES_IO_ERR; \
goto error; \
} \