[comp.windows.x] Weirdie in lib/Xmu/Lower.c

jkh@pcsbst.UUCP (Jordan K. Hubbard) (11/25/88)

Lines 32 - 34:

    for (dest = (unsigned char *)dst, source = (unsigned char *)src;
         *source;
->       *source++, *dest++)

The indicated line does not make sense. There doesn't seem to
be any reason to de-reference source and dest, and in fact it
seems to be a bug. The loop depends on *source eventually being
NULL, which it never becomes when * has precendence over ++.

Shouldn't this actually be:

    for (dest = (unsigned char *)dst, source = (unsigned char *)src;
         *source;
         source++, dest++)

???

I'm not totally sure that this is a bug, so I'm not submitting
a bug report until I'm sure. It went into an infinite loop on our
machine.

				Jordan Hubbard
				PCS Computer Systems, GmbH
				Munich, West Germany
				pyramid!pcsbst!jkh