# Impossible var type! [was: I love the new server...]

Richard Connamacher (phantom@baymoo.sfsu.edu)
Sat, 27 Jan 1996 13:46:54 PST

- Messages sorted by:[ date ][ thread ][ subject ][ author ]

    In list.c:

    >static package
    >bf_decode_binary(Var arglist, Byte next, void *vdata, Objid progr)
    >{
    >    int         length;
    >    const char *bytes = binary_to_raw_bytes(arglist.v.list[1].v.str, &length);
    >    int         nargs = arglist.v.list[0].v.num;
    >    int         fully = (nargs >= 2 && is_true(arglist.v.list[2]));

    So, it looks like the second argument can be of any value, since any value can be
    passed to is_true().  So, I changed the register_function line to:

    >    register_function("decode_binary", 1, 2, bf_decode_binary, TYPE_STR,
    >                      TYPE_ANY);

    That did the trick.

    Phantom