From 3c80312f3f6f202134699c90c551488f59c67016 Mon Sep 17 00:00:00 2001 From: Ted Lemon Date: Tue, 6 Jul 1999 16:51:19 +0000 Subject: [PATCH] Reverse output of conversion routine. --- common/convert.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common/convert.c b/common/convert.c index a1206648c..9f08f32e3 100644 --- a/common/convert.c +++ b/common/convert.c @@ -23,7 +23,7 @@ #ifndef lint static char copyright[] = -"$Id: convert.c,v 1.8 1999/07/02 20:57:24 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: convert.c,v 1.9 1999/07/06 16:51:19 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -168,5 +168,11 @@ int binary_to_ascii (outbuf, inbuf, base, width) number /= base; power++; } + + for (j = 0; j < i / 2; j++) { + unsigned char t = outbuf [j]; + outbuf [j] = outbuf [i - j - 1]; + outbuf [i - j - 1] = t; + } return power; } -- 2.47.2