Issue 5 in amx-netlinx-common: explode_quoted not working properly.

1 view
Skip to first unread message

amx-netli...@googlecode.com

unread,
May 18, 2010, 11:58:42 AM5/18/10
to netlinx-comm...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 5 by jska...@spireintegrated.com: explode_quoted not working
properly.
http://code.google.com/p/amx-netlinx-common/issues/detail?id=5

What steps will reproduce the problem?
1. Sending a string with a quoted value.

What is the expected output? What do you see instead?
It should strip the quotes and keep the string contained in quotes
together, but it is splitting on the spaces.

What version of the product are you using? On what operating system?
Current version on Google on NI-700 using NS3

Please provide any additional information below.
Here is the code block to fix it. I would have submitted to the CVS
directly, but I don't think I have permissions.

I am not sure that the check for a closing quote char is desired, but I put
it in. We might also want to add support for an escape char when using
quotes.

if (quote) {
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
}
}
}



Jeff



Reply all
Reply to author
Forward
0 new messages