-
if memory overrun occures - in the first example it may corrupt only name pointer, in the second - both name and guild pointer, so acessing the guild pointer in the second example in the same scenario will cause the crash, while the first one will survive a little longer
-
And a typical case of Undefined Behaviour - just as the name implies, it's not defined, so "anything" can happen. As vart says, re-arranging the structure may cause different behaviour, since the data being overwritten is not quite as sensitive as other data being overwritten - e.g. an integer can have just about any value, but pointers need to contain valid memory addresses.
--
Mats