-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
What steps will reproduce the problem?
1. On some architectures (e.g. ARM) xar will always return the usage() text,
even when provided with legit options.
2.
3.
What is the expected output? What do you see instead?
The command should work normally, instead you see usage text.
What version of the product are you using? On what operating system?
1.5.2 Linux ARM ubuntu. The ARM piece is key since the code seems to work on
x86.
Please provide any additional information below.
The fix is simple: in main(), c should be an int rather than a char.
getopt_long returns an int -- when it's cast to a char that can return 255 and
not match -1, depending on the compiler and optimizer.
Original issue reported on code.google.com by poeland....@gmail.com on 3 Feb 2011 at 8:06