rem: if (!isascii (ch)) { fprintf (stderr, "%d is not ascii, it says.\n", ch); } if (!isprint (ch)) { fprintf (stderr, "%d is not printable, it says.\n", ch); } if (isprint (ch) && (len + (pStr - pBaseStr) < MAX_DESC_CHARS))
add: if (isprint (ch) && (len + (pStr - pBaseStr) < MAX_NAME_CHARS))
context: DoTextEntry (PMENU_STATE pMS){	UWORD ch;	UNICODE *pStr, *pBaseStr;	COUNT len;	BOOLEAN left = FALSE, right = FALSE;	pBaseStr = ((GAME_DESC *)pMS->CurString)[pMS->CurState - pMS->first_item.y];	pStr = &pBaseStr[pMS->first_item.x];	len = wstrlen (pStr);	ch = GetCharacter ();#if 0	/* This code goes away, but is listed here anyway just in case someone decides	   to port this to a keyboardless platform later */	   	if (SerialInput)	{		ch = GetInputUNICODE (GetInputState (SerialInput));	}	else	{		extern UWORD GetJoystickChar (INPUT_STATE InputState);		ch = GetJoystickChar ();	}#endif	switch (ch)	{	case SK_DELETE:		if (len)		{			memmove (pStr, pStr + 1, len * sizeof (*pStr));			len = (COUNT)~0;		}		break;	case '\b':		if (pMS->first_item.x)		{			memmove (pStr - 1, pStr, (len + 1) * sizeof (*pStr));			--pMS->first_item.x;						len = (COUNT)~0;		}		break;	case SK_LF_ARROW:		left = TRUE;		break;	case SK_RT_ARROW:		right = TRUE;		break;	default:		/* This really should use isprint, but for some		 * ungodly reason some machines refuse to accept		 * anything as printable */		if (!isascii (ch)) {			fprintf (stderr, "%d is not ascii, it says.\n", ch);		}		if (!isprint (ch)) {			fprintf (stderr, "%d is not printable, it says.\n", ch);		}		if (isprint (ch) && (len + (pStr - pBaseStr) < MAX_DESC_CHARS))		{			memmove (pStr + 1, pStr, (len + 1) * sizeof (*pStr));			if (len == 0)				*(pStr + 1) = '\0';			*pStr++ = ch;			++pMS->first_item.x;#if 0			/* Joystick letter-entry mode */				*pStr = ch;				if (len == 0)					*(pStr + 1) = '\0';#endif						len = (COUNT)~0;		}		break;	}	if (len == (COUNT)~0)	{		if (!DrawDescriptionString (pMS, pMS->CurState, 1))		{			len = wstrlen (pStr);			memmove (pStr - 1, pStr, (len + 1) * sizeof (*pStr));			--pMS->first_item.x;		}	}	else if (left)	{		if (pMS->first_item.x)		{			--pMS->first_item.x;			DrawDescriptionString (pMS, pMS->CurState, 1);		}	}	else if (right)	{		if (len)		{			++pMS->first_item.x;			DrawDescriptionString (pMS, pMS->CurState, 1);		}	}	return (ch);}