added a debug-only printf warning if the char code returned is 0

This commit is contained in:
buster%netscape.com 1999-03-14 04:10:55 +00:00
parent 580248c300
commit e758191f6c
2 changed files with 8 additions and 0 deletions

View File

@ -225,6 +225,10 @@ NS_METHOD nsDOMEvent::GetCharCode(PRUint32* aCharCode)
case NS_KEY_UP:
case NS_KEY_DOWN:
*aCharCode = ((nsKeyEvent*)mEvent)->charCode;
#ifdef NS_DEBUG
if (0==*aCharCode)
printf("key event broken, GetCharChode returning 0x0 as the char code.\n");
#endif
break;
default:
return NS_ERROR_FAILURE;

View File

@ -225,6 +225,10 @@ NS_METHOD nsDOMEvent::GetCharCode(PRUint32* aCharCode)
case NS_KEY_UP:
case NS_KEY_DOWN:
*aCharCode = ((nsKeyEvent*)mEvent)->charCode;
#ifdef NS_DEBUG
if (0==*aCharCode)
printf("key event broken, GetCharChode returning 0x0 as the char code.\n");
#endif
break;
default:
return NS_ERROR_FAILURE;