Jacek Caban wrote:
I'm not fan of such fixes, but if you want to fix it, you should check len, not str, in your patch and you may move zero-terminating outside if..else statement.
Jacek
Thank you, I shall fix it in the better way that you describe here.