dialogs.c:Fix memory corruption bug. Allocate a byte for the null-terminator character.