- fixed some variables not being initialized

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1089 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
lalien
2007-07-20 18:16:54 +00:00
parent cdedbe8375
commit 9e92cefbfa
7 changed files with 39 additions and 13 deletions
@@ -1578,6 +1578,8 @@ INT32 CreateIconButton(INT16 Icon,INT16 IconIndex,INT16 GenImg,INT16 xloc,INT16
return(-1);
}
memset(b, 0, sizeof(GUI_BUTTON));
// Init the values in the struct
b->uiFlags = BUTTON_DIRTY;
b->uiOldFlags = 0;
@@ -1706,6 +1708,8 @@ INT32 CreateTextButton(STR16 string, UINT32 uiFont, INT16 sForeColor, INT16 sSha
return(-1);
}
memset(b, 0, sizeof(GUI_BUTTON));
// Allocate memory for the button's text string...
b->string = NULL;
if ( string && wcslen( string ) )
@@ -1836,6 +1840,8 @@ INT32 CreateHotSpot(INT16 xloc, INT16 yloc, INT16 Width, INT16 Height,INT16 Prio
return(-1);
}
memset(b, 0, sizeof(GUI_BUTTON));
// Init the structure values
b->uiFlags = 0;
b->uiOldFlags = 0;
@@ -1955,6 +1961,8 @@ INT32 QuickCreateButton(UINT32 Image,INT16 xloc,INT16 yloc,INT32 Type,INT16 Prio
return(-1);
}
memset(b, 0, sizeof(GUI_BUTTON));
// Set the values for this buttn
b->uiFlags = BUTTON_DIRTY;
b->uiOldFlags = 0;
@@ -2149,6 +2157,8 @@ INT32 CreateIconAndTextButton( INT32 Image, const STR16 string, UINT32 uiFont,
return(-1);
}
memset(b, 0, sizeof(GUI_BUTTON));
// Set the values for this button
b->uiFlags = BUTTON_DIRTY;
b->uiOldFlags = 0;