Wrong cycle with scan of spaces
We must use count of converted (actual) bytes at temp_buffer
No a size of temp_buffer (
CORE-1594)
No a count of converted bytes (dest count). (CORE-THIS_BUG)
---
Primary problem - using SINGLE local variable ' len ' for all cases:
1 - size of temp_buffer
2 - count of converted bytes from source into temp_buffer
3 - count of converted bytes in dest buffer.
On finish the "len" contaings the count of converted bytes IN DEST BUFFER.
But is used for scan of temp_buffer
Use 3 independent local variables and do scan FROM errPos TO count of bytes getted from second conversion (count of actually bytes in temp_buffer)
See attached source code in
CORE-1594
And just commit my changes.
I afraid, you can continue making a new bugs :)))
--------
Latest changes in ChConvert.h (1.7) added new interesting bug - Now we, instead of buffer with UCS2 symbols of source string, scan the spaces at the left temp2 buffer.
Left buffer with left length :)))
Reopening the other one should be sufficient.