[vox-tech] [C newbie]C program is acting weird...

Ryan vox-tech@lists.lugod.org
Thu, 31 Jan 2002 23:28:41 -0800


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

On Thursday, January 31 2002 10:54 pm, Ryan wrote:

>         for (i =3D 0; i < length; i++)
>                 // does your head hurt yet?
>                 string[i] =3D 'a' + random() / (RAND_MAX / ('z' + 1 - '=
a'));
>         // zero terminate!
>         i++;
>         string[i] =3D '\0';
>         return string;

This was breaking things, old stuff was getting left at the end to break=20
things.

If anyone cares, i'm modifing a fibbing ident server to give random respo=
nses.

- --=20
No Microsoft products were used in any way for the creation of this messa=
ge.
PGP Public key at http://mother.com/~ryan/ryan_at_mother_dot_com.asc
It is also on the servers: Key ID 0x72177BC7
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8WkOqEd9E83IXe8cRAuq9AJ9+J0jvXSQ3lmdiSK3/vEc3zWvUPgCgk65c
3TlvBjrpUhroIf/kKZpv6b8=3D
=3DSx3e
-----END PGP SIGNATURE-----