You need to be very careful... char is by default signed on many systems, so if a character > 128 was passed in this would corrupt memory at random