mirror of
git://git.psyced.org/git/psyclpc
synced 2024-08-15 03:20:16 +00:00
pkg-psyc: fix for parser
This commit is contained in:
parent
a27331f703
commit
62763ffeba
3 changed files with 6 additions and 1 deletions
|
@ -127,6 +127,8 @@ f_psyc_parse (svalue_t *sp) {
|
|||
state = pxalloc(sizeof(psyc_state_t));
|
||||
if (!state) errorf("Out of memory for psyc state struct.\n");
|
||||
O_GET_PSYC_STATE(current_object) = state;
|
||||
memset(state, 0, sizeof(psyc_state_t));
|
||||
|
||||
state->parser = pxalloc(sizeof(psycParseState));
|
||||
if (!state->parser) errorf("Out of memory for psyc parse state struct.\n");
|
||||
psyc_initParseState(state->parser);
|
||||
|
@ -161,6 +163,7 @@ f_psyc_parse (svalue_t *sp) {
|
|||
|
||||
if (state->remaining) {
|
||||
pfree(state->remaining);
|
||||
state->remaining = NULL;
|
||||
state->remaining_len = 0;
|
||||
}
|
||||
|
||||
|
@ -267,6 +270,7 @@ f_psyc_parse (svalue_t *sp) {
|
|||
|
||||
break;
|
||||
case PSYC_PARSE_COMPLETE:
|
||||
state->packet = NULL;
|
||||
ret = 0;
|
||||
break;
|
||||
case PSYC_PARSE_INSUFFICIENT:
|
||||
|
|
|
@ -44,6 +44,7 @@ psyc_free_state (psyc_state_t *ps) {
|
|||
pfree((void *) ps->parser);
|
||||
if (ps->packet)
|
||||
free_array(ps->packet);
|
||||
ps->name = ps->value = ps->remaining = ps->parser = ps->packet = NULL;
|
||||
ps->oper = ps->name_len = ps->value_len = ps->remaining_len = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ version_longtype="stable"
|
|||
# A timestamp, to be used by bumpversion and other scripts.
|
||||
# It can be used, for example, to 'touch' this file on every build, thus
|
||||
# forcing revision control systems to add it on every checkin automatically.
|
||||
version_stamp="Mon May 9 21:22:33 CEST 2011"
|
||||
version_stamp="Tue May 10 01:00:33 CEST 2011"
|
||||
|
||||
# Okay, LDMUD is using 3.x.x so to avoid conflicts let's just use 4.x.x
|
||||
version_major=4
|
||||
|
|
Loading…
Reference in a new issue