@@ -4412,7 +4412,7 @@ IO_stat MCButton::extendedload(MCObjectInputStream& p_stream, uint32_t p_version
44124412 if (p_remaining >= 4 )
44134413 {
44144414 uint4 t_hover_icon_id;
4415- t_stat = p_stream . ReadU32 (t_hover_icon_id);
4415+ t_stat = checkloadstat ( p_stream . ReadU32 (t_hover_icon_id) );
44164416 if (t_stat == IO_NORMAL)
44174417 {
44184418 icons = new iconlist;
@@ -4427,22 +4427,22 @@ IO_stat MCButton::extendedload(MCObjectInputStream& p_stream, uint32_t p_version
44274427 if (p_remaining > 0 )
44284428 {
44294429 uint4 t_flags, t_length, t_header_length;
4430- t_stat = p_stream . ReadTag (t_flags, t_length, t_header_length);
4430+ t_stat = checkloadstat ( p_stream . ReadTag (t_flags, t_length, t_header_length) );
44314431
44324432 if (t_stat == IO_NORMAL)
4433- t_stat = p_stream . Mark ();
4433+ t_stat = checkloadstat ( p_stream . Mark () );
44344434
44354435 // MW-2014-06-20: [[ IconGravity ]] Read in the iconGravity property.
44364436 if (t_stat == IO_NORMAL && (t_flags & BUTTON_EXTRA_ICONGRAVITY) != 0 )
44374437 {
44384438 uint32_t t_value;
4439- t_stat = p_stream . ReadU32 (t_value);
4439+ t_stat = checkloadstat ( p_stream . ReadU32 (t_value) );
44404440 if (t_stat == IO_NORMAL)
44414441 m_icon_gravity = (MCGravity)t_value;
44424442 }
44434443
44444444 if (t_stat == IO_NORMAL)
4445- t_stat = p_stream . Skip (t_length);
4445+ t_stat = checkloadstat ( p_stream . Skip (t_length) );
44464446
44474447 if (t_stat == IO_NORMAL)
44484448 p_remaining -= t_length + t_header_length;
@@ -4596,7 +4596,7 @@ IO_stat MCButton::load(IO_handle stream, uint32_t version)
45964596 IO_stat stat;
45974597
45984598 if ((stat = MCControl::load (stream, version)) != IO_NORMAL)
4599- return stat;
4599+ return checkloadstat ( stat) ;
46004600
46014601 // MW-2012-02-17: [[ IntrinsicUnicode ]] If the unicode tag is set, then we are unicode.
46024602 if ((m_font_flags & FF_HAS_UNICODE_TAG) != 0 )
@@ -4607,10 +4607,10 @@ IO_stat MCButton::load(IO_handle stream, uint32_t version)
46074607 uint4 iconid;
46084608 uint4 hiliteiconid = 0 ;
46094609 if ((stat = IO_read_uint4 (&iconid, stream)) != IO_NORMAL)
4610- return stat;
4610+ return checkloadstat ( stat) ;
46114611 if (flags & F_HAS_ICONS)
46124612 if ((stat = IO_read_uint4 (&hiliteiconid, stream)) != IO_NORMAL)
4613- return stat;
4613+ return checkloadstat ( stat) ;
46144614 if (iconid != 0 || hiliteiconid != 0 )
46154615 {
46164616 flags |= F_HAS_ICONS;
@@ -4638,7 +4638,7 @@ IO_stat MCButton::load(IO_handle stream, uint32_t version)
46384638 uint2 i;
46394639 for (i = CI_ARMED ; i < CI_FILE_NICONS ; i++)
46404640 if ((stat = IO_read_uint4 (&icons->iconids [i], stream)) != IO_NORMAL)
4641- return stat;
4641+ return checkloadstat ( stat) ;
46424642 }
46434643
46444644 // MW-2013-11-19: [[ UnicodeFileFormat ]] If sfv >= 7000, use unicode; otherwise use
@@ -4648,29 +4648,29 @@ IO_stat MCButton::load(IO_handle stream, uint32_t version)
46484648 if (version < 7000 )
46494649 {
46504650 if ((stat = IO_read_stringref_legacy (label, stream, hasunicode ())) != IO_NORMAL)
4651- return stat;
4651+ return checkloadstat ( stat) ;
46524652 }
46534653 else
46544654 {
46554655 if ((stat = IO_read_stringref_new (label, stream, true )) != IO_NORMAL)
4656- return stat;
4656+ return checkloadstat ( stat) ;
46574657 }
46584658 }
46594659
46604660 if (flags & F_LABEL_WIDTH)
46614661 if ((stat = IO_read_uint2 (&labelwidth, stream)) != IO_NORMAL)
4662- return stat;
4662+ return checkloadstat ( stat) ;
46634663
46644664 if (!(flags & F_NO_MARGINS))
46654665 {
46664666 if ((stat = IO_read_int2 (&leftmargin, stream)) != IO_NORMAL)
4667- return stat;
4667+ return checkloadstat ( stat) ;
46684668 if ((stat = IO_read_int2 (&rightmargin, stream)) != IO_NORMAL)
4669- return stat;
4669+ return checkloadstat ( stat) ;
46704670 if ((stat = IO_read_int2 (&topmargin, stream)) != IO_NORMAL)
4671- return stat;
4671+ return checkloadstat ( stat) ;
46724672 if ((stat = IO_read_int2 (&bottommargin, stream)) != IO_NORMAL)
4673- return stat;
4673+ return checkloadstat ( stat) ;
46744674 if (leftmargin == defaultmargin
46754675 && leftmargin == rightmargin
46764676 && leftmargin == topmargin
@@ -4680,7 +4680,7 @@ IO_stat MCButton::load(IO_handle stream, uint32_t version)
46804680
46814681 // MW-2013-11-19: [[ UnicodeFileFormat ]] If sfv >= 7000, use unicode.
46824682 if ((stat = IO_read_nameref_new (menuname, stream, version >= 7000 )) != IO_NORMAL)
4683- return stat;
4683+ return checkloadstat ( stat) ;
46844684
46854685 // MW-2013-11-19: [[ UnicodeFileFormat ]] If sfv >= 7000, use unicode; otherwise use
46864686 // legacy unicode output.
@@ -4689,51 +4689,51 @@ IO_stat MCButton::load(IO_handle stream, uint32_t version)
46894689 if (version < 7000 )
46904690 {
46914691 if ((stat = IO_read_stringref_legacy (menustring, stream, hasunicode ())) != IO_NORMAL)
4692- return stat;
4692+ return checkloadstat ( stat) ;
46934693 }
46944694 else
46954695 {
46964696 if ((stat = IO_read_stringref_new (menustring, stream, true )) != IO_NORMAL)
4697- return stat;
4697+ return checkloadstat ( stat) ;
46984698 }
46994699 }
47004700
47014701 if ((stat = IO_read_uint1 (&menubutton, stream)) != IO_NORMAL)
4702- return stat;
4702+ return checkloadstat ( stat) ;
47034703 family = menubutton >> 4 ;
47044704 menubutton &= 0x0F ;
47054705
47064706 if ((stat = IO_read_uint1 (&menumode, stream)) != IO_NORMAL)
4707- return stat;
4707+ return checkloadstat ( stat) ;
47084708
47094709 if (menumode > WM_MODAL)
47104710 menumode++;
47114711 if ((menumode == WM_OPTION || menumode == WM_TOP_LEVEL)
47124712 && (!MCNameIsEmpty (menuname) || flags & F_MENU_STRING))
47134713 if ((stat = IO_read_uint2 (&menuhistory, stream)) != IO_NORMAL)
4714- return stat;
4714+ return checkloadstat ( stat) ;
47154715
47164716 if (flags & F_MENU_LINES)
47174717 if ((stat = IO_read_uint2 (&menulines, stream)) != IO_NORMAL)
4718- return stat;
4718+ return checkloadstat ( stat) ;
47194719
47204720 // MW-2013-11-19: [[ UnicodeFileFormat ]] If sfv >= 7000, use unicode; otherwise use
47214721 // legacy unicode output.
47224722 if (version < 7000 )
47234723 {
47244724 if ((stat = IO_read_stringref_legacy (acceltext, stream, hasunicode ())) != IO_NORMAL)
4725- return stat;
4725+ return checkloadstat ( stat) ;
47264726 }
47274727 else
47284728 {
47294729 if ((stat = IO_read_stringref_new (acceltext, stream, true )) != IO_NORMAL)
4730- return stat;
4730+ return checkloadstat ( stat) ;
47314731 }
47324732
47334733 uint4 tacceltextsize;
47344734
47354735 if ((stat = IO_read_uint2 (&accelkey, stream)) != IO_NORMAL)
4736- return stat;
4736+ return checkloadstat ( stat) ;
47374737 if (accelkey < 256 )
47384738#ifdef __MACROMAN__
47394739 accelkey = MCisotranslations[accelkey];
@@ -4742,9 +4742,9 @@ IO_stat MCButton::load(IO_handle stream, uint32_t version)
47424742#endif
47434743
47444744 if ((stat = IO_read_uint1 (&accelmods, stream)) != IO_NORMAL)
4745- return stat;
4745+ return checkloadstat ( stat) ;
47464746 if ((stat = IO_read_uint1 (&mnemonic, stream)) != IO_NORMAL)
4747- return stat;
4747+ return checkloadstat ( stat) ;
47484748 if (version <= 2000 )
47494749 {
47504750 if (flags & F_DEFAULT)
@@ -4763,20 +4763,20 @@ IO_stat MCButton::load(IO_handle stream, uint32_t version)
47634763 }
47644764
47654765 if ((stat = loadpropsets (stream, version)) != IO_NORMAL)
4766- return stat;
4766+ return checkloadstat ( stat) ;
47674767
47684768 while (True)
47694769 {
47704770 uint1 type;
47714771 if ((stat = IO_read_uint1 (&type, stream)) != IO_NORMAL)
4772- return stat;
4772+ return checkloadstat ( stat) ;
47734773 if (type == OT_BDATA)
47744774 {
47754775 MCCdata *newbdata = new MCCdata;
47764776 if ((stat = newbdata->load (stream, this , version)) != IO_NORMAL)
47774777 {
47784778 delete newbdata;
4779- return stat;
4779+ return checkloadstat ( stat) ;
47804780 }
47814781 newbdata->appendto (bdata);
47824782 }
0 commit comments