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
This commit is contained in:
Duncaen 2019-06-18 15:03:00 +02:00
parent 7f141ca5d7
commit 3677986c7e

View File

@ -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 != ')')