When the string length is pair, no problem but when it's odd, the last character of the string is replaced by "\u0000" and another "\u0000" is added.
Unfortunatly, I've worked on that bug yesterday, I don't have exemple to show you the problem.
I run nodepccc with node js v5.3.0 on Arch Linux headless server.
After a few tries, I've found that it would be better to always give a pair string length to the function strSwap then simplified the code of this function.
Thanks for the pull request. I merged it, but notice that it adds a space at the end of a string that is not there in the PLC. But it works better than before, thank you.
I had a trouble while reading strings from plc.
When the string length is pair, no problem but when it's odd, the last character of the string is replaced by "\u0000" and another "\u0000" is added. Unfortunatly, I've worked on that bug yesterday, I don't have exemple to show you the problem.
I run nodepccc with node js v5.3.0 on Arch Linux headless server.
After a few tries, I've found that it would be better to always give a pair string length to the function strSwap then simplified the code of this function.
Now, it works as expected.
Signed-off-by: Julien Ledun j.ledun@iosystems.fr