From f78e3f351e7d72b7ff93a58aa6a5c03f6d4b0eb2 Mon Sep 17 00:00:00 2001 From: tg Date: Sat, 20 Oct 2018 18:34:14 +0000 Subject: [PATCH] fix #1779179 (another case of signed integers sucking) --- lex.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lex.c b/lex.c index 4fa3a43..8c75a98 100644 --- a/lex.c +++ b/lex.c @@ -23,7 +23,7 @@ #include "sh.h" -__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.249 2018/04/27 16:59:50 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.250 2018/10/20 18:34:14 tg Exp $"); /* * states while lexing word @@ -1176,7 +1176,7 @@ readhere(struct ioword *iop) /* Newline terminates here document marker */ goto heredoc_found_terminator; } - } else if (c == *eofp++) + } else if ((unsigned int)c == ord(*eofp++)) /* store; then read and compare next character */ goto heredoc_store_and_loop; /* nope, mismatch; read until end of line */