Re: Linux printf funny



My guess is that some other part of your program is corrupting memory,
and that after 7 or 8 iterations, the corruption has reached the code
or variables used in this function. There's nothing wrong with the
code you posted.- Hide quoted text -

....and this fits with your finding that the problem "went away" when
you moved the code into a different scope. The buffers / variables
would have moved, causing the overrun to smush something else instead.

- Tim.

.