K
Kelsey Bjarnason
Kelsey Bjarnason wrote:
Notice the other half of the expression?
Grr. Damn this being human thing sucks.
Anyway, regardless the code
is broken since if nch is not less than max, then additional input is
simply discarded.
An '\0' by itself is not a string.
Pass it to strlen, it'll work. Pass the results of whatever you've got
instead, it'll scream and die - if you're lucky.