Branch: Tag:

2019-07-19

2019-07-19 10:31:49 by Henrik Grubbström (Grubba) <grubba@grubba.org>

encode_value: Fixed encoding bug for some variant functions.

A stray number was added to the identifier reference table.
This caused the decoder to become confused.

Fixes dumping errors for Web.SocketIO.

1448:    }    if (other >= id) {    /* variant before termination function. */ -  break; +  EDB(3, fprintf(stderr, "%*sVariant before termination function.\n", +  data->depth, "")); +  goto next_identifier_ref;    }    if ((other->identifier_flags & IDENTIFIER_TYPE_MASK) ==    IDENTIFIER_PIKE_FUNCTION) {
1470:    gs_flags = r->id_flags & ref->id_flags;    id = other;    ref = r; +  EDB(3, fprintf(stderr, "%*sEncoding termination function.\n", +  data->depth, ""));    goto encode_pike_function;    }    }