Re: [NEWBIE][CODE] Stupid Buffer Thing

From: Welcor (
Date: 06/24/01

----- Original Message -----
From: "Edward Felch" <dustlos@HOTMAIL.COM>
To: <>
> Output:
> memberslis <- should be Nae' Blis members
>   *buf = '\0';
This line is unnecessary - you overwrite this in the next line.

>   sprintf(buf, "%s members\r\n", clan->name);

How is clan->name defined ? As a
const char, char *, or char[array] ?

The above output seems to indicate that in the end of clan->name
there is a \r

If there isn't:

- the behaviour might be caused by the ' in "Nae' Blis"
  try using "Nae\' Blis" and see if it helps
  I'm fairly positive that if you run the program through gdb
  you'd see that buf actually is correct before being sent to
  char. write_to_output() will alter your text if it's needed
  for some obscure (colorcodes etc.) reason.


   | FAQ: |
   | Archives: |

This archive was generated by hypermail 2b30 : 12/05/01 PST