From 3677986c7e2b0db92a464402913b845b298e8e21 Mon Sep 17 00:00:00 2001 From: Duncaen Date: Tue, 18 Jun 2019 15:03:00 +0200 Subject: [PATCH] bin/xbps-checkvers: store character returned by fgetc in int The character has to be checked for EOF (-1), otherwise with architectures that use unsigned char by default this breaks at compile and runtime. https://github.com/void-linux/xbps/issues/123 --- bin/xbps-checkvers/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/xbps-checkvers/main.c b/bin/xbps-checkvers/main.c index 00597019..50d471d0 100644 --- a/bin/xbps-checkvers/main.c +++ b/bin/xbps-checkvers/main.c @@ -219,7 +219,7 @@ rcv_sh_substitute(rcv_t *rcv, const char *str, size_t len) p++; if (*p == '(') { FILE *fp; - char c; + int c; for (ref = ++p; *p && p < str+len && *p != ')'; p++) ; if (*p != ')')