Android market reports a few crashes going out-of-bounds on array of

bad words.  Add an assertion on the only path that seems likely to be
causing that.
This commit is contained in:
Andy2 2010-12-17 18:57:43 -08:00
parent 0ee156c9f0
commit ff6fb7070e

View file

@ -336,7 +336,7 @@ and_util_warnIllegalWord( XW_UtilCtxt* uc, BadWordInfo* bwi,
{
jboolean result = XP_FALSE;
UTIL_CBK_HEADER("warnIllegalWord", "([Ljava/lang/String;IZ)Z" );
XP_ASSERT( bwi->nWords > 0 );
jobjectArray jwords = makeStringArray( env, bwi->nWords,
(const XP_UCHAR**)bwi->words );
result = (*env)->CallBooleanMethod( env, util->jutil, mid,