From 961ba05a38ad079e1fe72de96a59b036b98c35d2 Mon Sep 17 00:00:00 2001 From: minima Date: Sat, 5 Aug 2000 10:48:36 +0000 Subject: [PATCH] fixed a hex character recognition problem I appear to have introduced in the C client. --- Changes | 2 ++ src/client.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Changes b/Changes index 7802845a..fc00fdde 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,5 @@ +05Aug00======================================================================= +1. Fixed hax character problem put in somewhen in the C Client 02Aug00======================================================================= 1. put back hex check exception for PC29 01Aug00======================================================================= diff --git a/src/client.c b/src/client.c index c330536b..d2ed0c47 100644 --- a/src/client.c +++ b/src/client.c @@ -448,12 +448,12 @@ int fcb_handler(sel_t *sp, int in, int out, int err) case 1: mp->state = 2; - if (ch >= '2' && ch <= '9') + if (ch >= '0' && ch <= '9') c = (ch - '0') << 4; else if (ch >= 'A' && ch <= 'F') c = (ch - 'A' + 10) << 4; else { - dbg(DMSG, "Illegal hex char (%c) received in state %d", ch, mp->state); + dbg(DMSG, "Illegal hex char (%c) received in state 1", ch); mp->inp = mp->data; mp->state = 0; } @@ -465,7 +465,7 @@ int fcb_handler(sel_t *sp, int in, int out, int err) else if (ch >= 'A' && ch <= 'F') *mp->inp++ = c | (ch - 'A' + 10); else { - dbg(DMSG, "Illegal hex char (%c) received in state %d", ch, mp->state); + dbg(DMSG, "Illegal hex char (%c) received in state 2", ch); mp->inp = mp->data; } mp->state = 0; -- 2.34.1