Closed bitwitch closed 7 months ago
When calling strncmp with an n value that is less than the length of the strings being compared, then the index variable i was being incremented one too many times and comparing one extra character. This patch fixes that.
Thanks! Saw your comment on the discord before your PR, so I fixed it in 5cc84169 instead of merging. Added an explicit check for n==0, too.
When calling strncmp with an n value that is less than the length of the strings being compared, then the index variable i was being incremented one too many times and comparing one extra character. This patch fixes that.