I was looking at strcat_s adds strange characters.
The problem can be fixed by changing the line:
char c_buffer[MAX_PATH*2] ;
to
char c_buffer[MAX_PATH*2] = {0};
This is minor fix to the code that may or may not help other SO users.
- Do such questions deserve to be closed?
- Does this question fall under "Closing -> Off-Topic > This question was caused by a problem that can no longer be reproduced or a simple typographical error." category?
Update
Another question posted the same day that falls under the category of "needing minor changes to the code to fix the problem" - Trouble with using calloc with an array and returning a pointer
typographical errors
, but stuff that ranges no the same level. I have to admit being using that close reason for this category of questions (wrongly). The problem might be that the available duplicates are really too many.