From 5f6a3213e254a9ef178fc756b72badd5823811b2 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 15 Oct 2005 09:28:56 +0000 Subject: r11084: - allow hex numbers with 'a'...'f' digits to be parsed - parse hex numbers correct tridge: how could we submit this to the upstream appweb library? metze (This used to be commit 70cde83c134f2d8bb2f6c0649b7f87a8846e63a4) --- source4/lib/appweb/mpr/var.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/lib/appweb/mpr') diff --git a/source4/lib/appweb/mpr/var.c b/source4/lib/appweb/mpr/var.c index 09979156e8..011d668460 100644 --- a/source4/lib/appweb/mpr/var.c +++ b/source4/lib/appweb/mpr/var.c @@ -2015,7 +2015,7 @@ int64 mprParseInteger64(char *str) if (isdigit(c)) { num64 = (c - '0') + (num64 * radix); } else if (c >= 'a' && c <= 'f') { - num64 = (c - 'a') + (num64 * radix); + num64 = (c - ('a' - 10)) + (num64 * radix); } else { break; } @@ -2132,7 +2132,7 @@ int mprParseInteger(char *str) if (isdigit(c)) { num = (c - '0') + (num * radix); } else if (c >= 'a' && c <= 'f') { - num = (c - 'a') + (num * radix); + num = (c - ('a' - 10)) + (num * radix); } else { break; } -- cgit