Problem with test applet - values above 128 are handled strange

Alexander Griesser alexander.griesser at lkh-vil.or.at
Fri May 25 05:14:28 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Souf wrote:
> I found the source of the problem, in test.c (svn), line 322:
> 
> smallint val1, val2;
> 
> the type of these two variables must be arith_t because their values
> returned by getn:
> 
> static arith_t getn(const char *s)
> 
> I attached a patch to correct this bug.

Thanks, that does the trick for me!

tuxx at vi-edv003:~/busybox/busybox$ ./busybox sh
$ [ 6 -le 6 ] && echo ok
ok
$ [ 127 -le 6 ] && echo ok
$ [ 128 -le 6 ] && echo ok
$ [ 355 -le 6 ] && echo ok
$ [ 2000 -le 6 ] && echo ok
$ [ 13000 -le 6 ] && echo ok
$ [ 99999 -le 6 ] && echo ok

thanks again,
- --
Alexander Griesser (Netzwerkadministration)
E-Mail: alexander.griesser at lkh-vil.or.at | Web: http://www.lkh-vil.or.at
KABEG LKH Villach | Nikolaigasse 43 | 9500 Villach
Tel.:   +43 4242 208 3061 | Fax.:   +43 4242 971 3061
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGVnC066HVD6KUm1oRAvytAKCKo191Jjw9gRSLBpd3KeKqKlZ1FwCfTyPw
teU6cTwWc7oWYwGc1CWNE58=
=ZAKK
-----END PGP SIGNATURE-----



More information about the busybox mailing list