Skip to content

Commit 1c4e6c0

Browse files
committed
Fixed signed char issue on unsigned char systems
There is an if (c < 0) check a few lines below which is always false for systems that use the unsigned version of char. This is allowed by the C standard and common on powerpc and arm platforms.
1 parent 97d2850 commit 1c4e6c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

linenoise.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ static int linenoiseEdit(int stdin_fd, int stdout_fd, char *buf, size_t buflen,
819819

820820
if (write(l.ofd,prompt,l.plen) == -1) return -1;
821821
while(1) {
822-
char c;
822+
signed char c;
823823
int nread;
824824
char seq[3];
825825

0 commit comments

Comments
 (0)