>> Allan Stirling wrote: >> >> >> The code is fine as long as buf is unsigned. There's no 8-bit >> arithmetic in C - chars are always expanded to ints. And btw, >> shifting by the width of the (expanded) left operand is undefined, >> not 0. > > Uh, depends on the architecture the program finally runs on. Does not have anything to do with C at all. -- --- Regards, Martin Cap