ports/misc/uniutils/patches/patch-unireverse_c

16 lines
364 B
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
Fix an infinite loop on archs where char is unsigned by default (arm*
and powerpc), because EOF (-1) could not be reached by getc(3).
Index: unireverse.c
--- unireverse.c.orig
+++ unireverse.c
@@ -151,7 +151,7 @@ int main(int ac, char **av) {
char * GetLine(FILE *fp, int *LineLength)
{
- char c;
+ int c;
int Available;
int CharsRead;
char *Line;