5 ms·
I agree: Recently I found an interesting snippet of C code which was using an sprintf to write a string into a char array. Unfortunately, it contained an off-b
by rubenbe 7y ago
I agree:
Recently I found an interesting snippet of C code which was using an sprintf to write a string into a char array.
Unfortunately, it contained an off-by-one error where the null terminator would be written outside the char.
I proposed to fix the answer, but for incomprehensible reasons the edit was rejected (!)
- gambiting 7y agoSO is the worst example of "poop must be delicious - after all, billions of flies can't be wrong!" mentality. As long as the answer is upvoted by enough people, it's accepted as the right one and it takes a titanic effort to correct it, no matter how wrong it is.
- jodrellblank 7y ago> As long as the answer is upvoted by enough people, it's accepted as the right one That's not correct; the questioner can accept any answer, the criteria is that the questioner chooses which answer helped them. There is no connection between votes and acceptance, no claim that "accepted" is endorsement by StackOverflow the company, by subject matter experts, or by "the community".
- Ajedi32 7y agoSee https://meta.stackexchange.com/a/164449/192171 https://meta.stackexchange.com/a/164449/192171 If an answer is factually wrong (as opposed to just poorly formatted or missing a few details), generally its better to leave a comment rather than try to edit it. I agree its not ideal, but suggested edits go into a site-wide review queue, so not everyone reviewing them will necessarily be familiar with C. This makes edit reviews a poor tool for evaluating factual correctness; the comments section and voting system on answers is a better tool for that job.
- crooked-v 7y ago"You can comment" doesn't help when you need a certain rep threshold just to comment.
- chipperyman573 7y agoDon't you need more to propose an edit?
- CJefferson 7y ago"We must fix grammatical errors and must not fix technical errors" agrees with my experience on stackoverflow perfectly.
- Ajedi32 7y agoFixing technical errors is strongly encouraged, just not via the suggested edits feature. Like I said, a comment or an alternative answer would be more appropriate.
- Miraste 7y agoIf the fix is buried in a comment or lower answer, far fewer people will see it, especially on the ossified, highly-voted answers where it's often needed. Difficulty moderating proposed edits is a process problem, and comments aren't a good workaround.