[amx-netlinx-common] r30 committed - Fixed explode_quoted function to properly handled quoted values....

0 views
Skip to first unread message

amx-netli...@googlecode.com

unread,
May 18, 2010, 10:04:53 PM5/18/10
to netlinx-comm...@googlegroups.com
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
+ }
}
}

Reply all
Reply to author
Forward
0 new messages