case EOF is now checked only on x86 arches

This check causes problems on architectures where char is unsigned, thus
EOF which is a signed int has a value less of the minimum permitted by the type.
To be honest this check could just be avoided alltogether, maybe in the future.
This commit is contained in:
Alessandro Mauri 2020-10-04 23:21:03 +02:00
parent 04bfca1932
commit 3bd678d48e

4
hkd.c
View File

@ -753,7 +753,9 @@ void parse_config_file (void)
bb++; bb++;
// get state // get state
switch (*bb) { switch (*bb) {
case (int)EOF: #if defined(__X86_64__) || defined(__i386__)
case EOF:
#endif
case '\0': case '\0':
// If it is the end of the last block exit // If it is the end of the last block exit
if (exit_state > 1) if (exit_state > 1)