[OCLUG-devel] malloc() woes
James Colannino
james at colannino.org
Sun May 29 13:29:28 PDT 2005
Christopher Smith wrote:
> If the buffer is filled, buffer[BUFFER_SIZE-1] should equal '\0'. It
> should never be '\n' unless from garbage memory.
You're right. Thanks for catching that. I changed the code to if
(buffer[BUFFER_SIZE - 2] = '\n')
James
--
My blog: http://www.crazydrclaw.com/
My homepage: http://james.colannino.org/
"A well regulated militia being necessary to the security of a free
state, THE RIGHT of the people to keep and bear arms SHALL NOT BE
INFRINGED." --United States Constitution, Second Ammendment
More information about the OCLUG-devel
mailing list