Author: khornicek
Date: Sun Feb 5 18:17:27 2017
New Revision: 73711
URL:
http://svn.reactos.org/svn/reactos?rev=73711&view=rev
Log:
[SPIDER]
- Add a null pointer check. CID 500248
- Check for a memory allocation failure.
- Improve Czech resources.
Modified:
trunk/reactos/base/applications/games/spider/lang/cs-CZ.rc
trunk/reactos/base/applications/games/spider/spider.cpp
Modified: trunk/reactos/base/applications/games/spider/lang/cs-CZ.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/sp…
==============================================================================
--- trunk/reactos/base/applications/games/spider/lang/cs-CZ.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/games/spider/lang/cs-CZ.rc [iso-8859-1] Sun Feb 5
18:17:27 2017
@@ -1,4 +1,4 @@
-LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
+LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
/* Dialogs */
@@ -28,7 +28,7 @@
CAPTION "ObtÞnost"
FONT 8, "MS Shell Dlg"
BEGIN
- AUTORADIOBUTTON "Jednoduchá: &Jedna barva", IDC_DIF_ONECOLOR, 8, 10,
80, 10, WS_GROUP | WS_TABSTOP
+ AUTORADIOBUTTON "Lehká: &Jedna barva", IDC_DIF_ONECOLOR, 8, 10, 80,
10, WS_GROUP | WS_TABSTOP
AUTORADIOBUTTON "StÅednÃ: &DvÄ barvy", IDC_DIF_TWOCOLORS, 8, 23, 80,
10
AUTORADIOBUTTON "Težká: Ä&tyÅi barvy", IDC_DIF_FOURCOLORS, 8, 36,
80, 10
DEFPUSHBUTTON "OK", IDOK, 8, 58, 40, 14
Modified: trunk/reactos/base/applications/games/spider/spider.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/sp…
==============================================================================
--- trunk/reactos/base/applications/games/spider/spider.cpp [iso-8859-1] (original)
+++ trunk/reactos/base/applications/games/spider/spider.cpp [iso-8859-1] Sun Feb 5
18:17:27 2017
@@ -163,7 +163,10 @@
GWL_USERDATA);
static WNDPROC hOldProc = NULL;
- if (!hOldProc && pCardBack)
+ if(!pCardBack)
+ return FALSE;
+
+ if (!hOldProc)
hOldProc = pCardBack->hOldProc;
switch (msg)
@@ -246,9 +249,10 @@
INT i, c;
SIZE_T size = sizeof(CARDBACK) * NUM_CARDBACKS;
- pCardBacks = (PCARDBACK)HeapAlloc(GetProcessHeap(),
- 0,
- size);
+ pCardBacks = (PCARDBACK)HeapAlloc(GetProcessHeap(), 0, size);
+
+ if(!pCardBacks)
+ return FALSE;
for (i = 0, c = CARDBACK_START; c <= CARDBACK_END; i++, c++)
{