Treat getopt return value as int instead of char. Avoids bar getting stuck in an endless loop on PPC platforms. (Thanks to @electro7)

This commit is contained in:
LemonBoy 2015-02-14 00:09:34 +01:00
parent 704ba652d9
commit d8443785a8
1 changed files with 1 additions and 1 deletions

2
bar.c
View File

@ -1215,6 +1215,7 @@ main (int argc, char **argv)
char input[4096] = {0, };
bool permanent = false;
int geom_v[4] = { -1, -1, 0, 0 };
int ch;
// Install the parachute!
atexit(cleanup);
@ -1230,7 +1231,6 @@ main (int argc, char **argv)
ugc = fgc;
char ch;
while ((ch = getopt(argc, argv, "hg:bdf:a:pu:B:F:")) != -1) {
switch (ch) {
case 'h':