26 lines
658 B
Diff
26 lines
658 B
Diff
From 6baa02aa3739779b1833d986a590f7ab094817cb Mon Sep 17 00:00:00 2001
|
|
From: Rainer Gerhards <rgerhards@adiscon.com>
|
|
Date: Wed, 28 May 2014 17:23:06 +0200
|
|
Subject: [PATCH 06/30] fix: str2num did not convert hex values correctly
|
|
|
|
---
|
|
src/string.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/string.c b/src/string.c
|
|
index f1fb6b1..256bc62 100644
|
|
--- a/src/string.c
|
|
+++ b/src/string.c
|
|
@@ -589,7 +589,7 @@ es_str2num_hex(es_str_t *s, int *bSuccess)
|
|
|
|
i = 0;
|
|
num = 0;
|
|
- c = es_getBufAddr(s);
|
|
+ c = es_getBufAddr(s) + 2;
|
|
while(i < s->lenStr && isxdigit(c[i])) {
|
|
if(isdigit(c[i]))
|
|
num = num * 16 + c[i] - '0';
|
|
--
|
|
1.8.3.1
|
|
|