Revision: 30
Author:
jsk...@spireintegrated.com
Date: Tue May 18 19:03:43 2010
Log: Fixed explode_quoted function to properly handled quoted values.
Function now also checks for closing quotes.
http://code.google.com/p/amx-netlinx-common/source/detail?r=30
Modified:
/trunk/string.axi
=======================================
--- /trunk/string.axi Sun May 16 23:57:58 2010
+++ /trunk/string.axi Tue May 18 19:03:43 2010
@@ -145,14 +145,15 @@
}
if (quote) {
- if (a[start] == '"') { // handle quotes
- end = find_string(a, '"', start + 1)
-
- ret[i] = mid_string(a, start + 1, (end - start) - 1)
- i++
-
- start = end + 1
- continue
+ if (a[start] == quote) { // handle quotes
+ end = find_string(a, "quote", start + 1)
+ if(end){
+ ret[i] = mid_string(a, start + 1, (end - start) - 1)
+ i++
+
+ start = end + 1
+ continue
+ }
}
}