From 451111dc51df69580d04c9965f70531f50e3d509 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Tue, 9 Apr 2024 12:59:07 +0300 Subject: add initial ufcs checks --- src/compiler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/compiler.c') diff --git a/src/compiler.c b/src/compiler.c index 5aa6787..14a838a 100644 --- a/src/compiler.c +++ b/src/compiler.c @@ -47,11 +47,11 @@ static char *read_file(const char *file, FILE *f) fseek(f, 0, SEEK_SET); - char *buf = malloc(s + 1); + char *buf = malloc((size_t)(s + 1)); if (!buf) return NULL; - fread(buf, s + 1, 1, f); + fread(buf, (size_t)(s + 1), 1, f); /* remember terminating null */ buf[s] = 0; return buf; -- cgit v1.3