From f7cf9cd1a07ce2966ecfab9050ae49ee8f40d30f Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 25 May 2007 23:14:04 +0200 Subject: [PATCH] evalue_read: fix for top-level fractional part --- evalue_read.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/evalue_read.c b/evalue_read.c index 371ed76..99968a5 100644 --- a/evalue_read.c +++ b/evalue_read.c @@ -445,7 +445,7 @@ static evalue *read_periodic(struct stream *s, struct parameter **p) token_free(tok); tok = stream_next_token(s); - if (tok->type == '_') { + if (tok && tok->type == '_') { int pos; token_free(tok); tok = stream_next_token(s); @@ -466,12 +466,14 @@ static evalue *read_periodic(struct stream *s, struct parameter **p) free(list[n]); } } else if (n == 1) { - stream_push_token(s, tok); + if (tok) + stream_push_token(s, tok); e = create_fract_like(s, list[0], flooring, p); n = 0; } else { stream_error(s, tok, "unexpected token"); - stream_push_token(s, tok); + if (tok) + stream_push_token(s, tok); } out: -- 2.11.4.GIT