Copy-Paste
V523 The ‘then’ statement is equivalent to the ‘else’ statement. Queque.cpp 358
void FTP::AddToQueque(FAR_FIND_DATA* FileName, LPCSTR Path, BOOL Download) { .... char *m; .... if(Download) m = strrchr(FileName->cFileName, '/'); else m = strrchr(FileName->cFileName, '/'); .... }
The second condition in this example must have been also written with the help of “Copy-Paste”: whatever the value of Download (TRUE, FALSE), the ‘m’ pointer will be assigned the position of the last occurrence of the ‘/‘ character.
Please click here to see more bugs from this project.
Please fix code sample: looks like you forget “else” branch.
Also you forget last “e” in “Copy-Past” header.
LikeLike
There is no else statement in code provided. It looks like your copy-paste of the source code failed too.
LikeLike
Thank you, WordPress didn’t show the code in angle brackets. It proves once more that you can easily make an error doing the copy-paste.
LikeLike