]> diplodocus.org Git - nmh/commit
contains8bit(): Don't fetch a byte when start >= end.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sun, 20 Aug 2017 10:38:04 +0000 (11:38 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sun, 20 Aug 2017 10:38:04 +0000 (11:38 +0100)
commitdc7efebe09e15e0e9e8a7821602c5052f00ef9b9
treef357e84ab574cdaee65d619927a0577c6a1d60f0
parent5da45d9802e59261cba09af83ebc77e106345b04
contains8bit(): Don't fetch a byte when start >= end.

The test for a NUL byte was before the test for start being before end.
Whilst here, hoist the test of end out of the per-byte loop, alter the
function to return bool, and merge the two, different, comments
explaining the function's behaviour.
h/utils.h
sbr/utils.c