From e758191f6ce23911c292baf32f01a7e016d827e5 Mon Sep 17 00:00:00 2001 From: "buster%netscape.com" Date: Sun, 14 Mar 1999 04:10:55 +0000 Subject: [PATCH] added a debug-only printf warning if the char code returned is 0 --- content/events/src/nsDOMEvent.cpp | 4 ++++ layout/events/src/nsDOMEvent.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/content/events/src/nsDOMEvent.cpp b/content/events/src/nsDOMEvent.cpp index 1e49af13fb00..147da8c24ef5 100644 --- a/content/events/src/nsDOMEvent.cpp +++ b/content/events/src/nsDOMEvent.cpp @@ -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; diff --git a/layout/events/src/nsDOMEvent.cpp b/layout/events/src/nsDOMEvent.cpp index 1e49af13fb00..147da8c24ef5 100644 --- a/layout/events/src/nsDOMEvent.cpp +++ b/layout/events/src/nsDOMEvent.cpp @@ -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;