this is a bug (bad (char) cast) and will be fixed in the next release
thanks for the report and example

if you are building from source make this change in bltins/getopts.c

-       else if (opt_info.num > 0 && opt_info.arg && opt_info.arg[0] == 
(char)opt_info.num)
+       else if (opt_info.arg && opt_info.num > 0 && 
isalpha((char)opt_info.num) && !isdigit(opt_info.arg[0]) && opt_info.arg[0] != 
'-' && opt_info.arg[0] != '+')

On Wed, 07 May 2008 18:30:21 +0200 Chris Paulheim wrote:
> i am using ksh93 version         sh (AT&T Research) 1993-12-28 s

> and have a problem with getopts and numeric values.

> When i give an option the numeric value 16177 the variable will be set to 1.

_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to