From 092d47f339eb07f67dc9e8356a53af81be546737 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 26 Feb 1996 18:34:44 +0000 Subject: [PATCH] Bug fix. --- comstack/waislen.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/comstack/waislen.c b/comstack/waislen.c index e082680..ea8f0a5 100644 --- a/comstack/waislen.c +++ b/comstack/waislen.c @@ -4,12 +4,16 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: waislen.c,v $ - * Revision 1.1 1996-02-20 13:02:58 quinn + * Revision 1.2 1996-02-26 18:34:44 adam + * Bug fix. + * + * Revision 1.1 1996/02/20 13:02:58 quinn * Wais length. * * */ +#include /* * Return length of WAIS package or 0 */ @@ -23,7 +27,7 @@ int completeWAIS(unsigned char *buf, int len) return 0; /* calculate length */ for (i = 0; i < 10; i++) - lval = lval * 10 + buf[i]; + lval = lval * 10 + (buf[i] - '0'); lval += 25; if (len >= lval) return lval; -- 1.7.10.4