From adbb3ff6babb79e7c9dcbd9ce55108ab13c1c676 Mon Sep 17 00:00:00 2001
From: Jan Breuer <jan.breuer@jaybee.cz>
Date: 周一, 14 9月 2015 22:41:34 +0800
Subject: [PATCH] Resolve #47: Wrong error message

---
 libscpi/src/utils.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/libscpi/src/utils.c b/libscpi/src/utils.c
index 0a9de65..66dbc64 100644
--- a/libscpi/src/utils.c
+++ b/libscpi/src/utils.c
@@ -156,6 +156,19 @@
 }
 
 /**
+ * Converts string to unsigned 32bit integer representation
+ * @param str   string value
+ * @param val   32bit integer result
+ * @return      number of bytes used in string
+ */
+size_t strToULong(const char * str, uint32_t * val, int8_t base) {
+    char * endptr;
+    *val = strtoul(str, &endptr, base);
+    return endptr - str;
+}
+
+
+/**
  * Converts string to double representation
  * @param str   string value
  * @param val   double result

--
Gitblit v1.9.1