On 01.05.2016 17:30, Pierre Schweitzer wrote:
while ((lpstrEdit[nStrCharCount]!='"') && (nStrCharCount <= nStrLen))
while ((nStrCharCount <= nStrLen) && (lpstrEdit[nStrCharCount]!='"'))
The change looks correct, but while you are just it, you might also want to fix the operator here. It probably should be <, otherwise the loop will also copy the terminating \0 character. Same for the comparison a couple of lines above.
Le 01/05/2016 17:49, Sebastian Lackner a écrit :
On 01.05.2016 17:30, Pierre Schweitzer wrote:
while ((lpstrEdit[nStrCharCount]!='"') && (nStrCharCount <= nStrLen))
while ((nStrCharCount <= nStrLen) && (lpstrEdit[nStrCharCount]!='"'))
The change looks correct, but while you are just it, you might also want to fix the operator here. It probably should be <, otherwise the loop will also copy the terminating \0 character. Same for the comparison a couple of lines above.
Hum. Indeed. But given the side effects the proposed can have (off-by-one bugs are rather nasty). I'd rather do it in a second commit. Unless you want all in one Alexandre?
Thanks for the review!