Make sure 'val.p' is always initialized, even when the union holds a shorter type. b=409294 r+sr=benjamin a=mtschrep

This commit is contained in:
mats.palmgren@bredband.net 2008-01-19 09:03:25 -08:00
parent cc2f2427fc
commit bcaeaafb1e

View File

@ -128,6 +128,7 @@ struct nsXPTCVariant : public nsXPTCMiniVariant
else
{
ptr = nsnull;
val.p = nsnull; // make sure 'val.p' is always initialized
switch(t.TagPart()) {
case nsXPTType::T_I8: val.i8 = mv.val.i8; break;
case nsXPTType::T_I16: val.i16 = mv.val.i16; break;