In my usual passive aggresive way I smack down in one thread and humbly ask for help in another 
So,
;
Could this code crash at any moment ? I seem to be putting a string in a pointer that points to one char only ?? What would be the proper way of doing this without jumping through hoops to make the msg_print work ?
T.

So,
Code:
/* Check for entering a dungeon */
if ((p_ptr->visits & (0x1 << dun_level)) == 0)
{
const char *msg = NULL;
if (dun_level == 0)
msg = "You enter the sewers of Volterra.";
else if (dun_level == 1)
msg = "You descend into the lower levels of Hell.";
else if (dun_level == 10)
msg = "You descend into the circle of the Heretics."
...
msg_print(msg);
Could this code crash at any moment ? I seem to be putting a string in a pointer that points to one char only ?? What would be the proper way of doing this without jumping through hoops to make the msg_print work ?
T.
Comment