4 ms·
>The main problem is that C lets you typo this: >strlen(s+1) >When you mean this: >strlen(s)+1 There are tools to find that, like: https://clang.llvm.org/extr
by 1over137 4y ago
>The main problem is that C lets you typo this:
>strlen(s+1)
>When you mean this:
>strlen(s)+1
There are tools to find that, like:
https://clang.llvm.org/extra/clang-tidy/checks/bugprone/misplaced-operator-in-strlen-in-alloc.html https://clang.llvm.org/extra/clang-tidy/checks/bugprone/misp...