OS/2 resource storage and retrieval
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
47f12f58db
commit
e8fd750b53
@ -418,7 +418,8 @@ bool wxGetResource(
|
|||||||
{
|
{
|
||||||
HAB hab;
|
HAB hab;
|
||||||
HINI hIni;
|
HINI hIni;
|
||||||
static const wxChar zDefunkt[] = _T("$$default");
|
wxChar zDefunkt[] = _T("$$default");
|
||||||
|
char zBuf[1000];
|
||||||
|
|
||||||
if (rFile != "")
|
if (rFile != "")
|
||||||
{
|
{
|
||||||
@ -429,11 +430,14 @@ bool wxGetResource(
|
|||||||
,(PSZ)WXSTRINGCAST rSection
|
,(PSZ)WXSTRINGCAST rSection
|
||||||
,(PSZ)WXSTRINGCAST rEntry
|
,(PSZ)WXSTRINGCAST rEntry
|
||||||
,(PSZ)zDefunkt
|
,(PSZ)zDefunkt
|
||||||
,(void*)*ppValue
|
,(PVOID)zBuf
|
||||||
,1000
|
,1000
|
||||||
);
|
);
|
||||||
if (n != 0L || wxStrcmp(*ppValue, zDefunkt) == 0)
|
if (zBuf == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
if (n == 0L || wxStrcmp(zBuf, zDefunkt) == 0)
|
||||||
|
return FALSE;
|
||||||
|
zBuf[n-1] = '\0';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -444,12 +448,16 @@ bool wxGetResource(
|
|||||||
,(PSZ)WXSTRINGCAST rSection
|
,(PSZ)WXSTRINGCAST rSection
|
||||||
,(PSZ)WXSTRINGCAST rEntry
|
,(PSZ)WXSTRINGCAST rEntry
|
||||||
,(PSZ)zDefunkt
|
,(PSZ)zDefunkt
|
||||||
,(void*)*ppValue
|
,(PVOID)zBuf
|
||||||
,1000
|
,1000
|
||||||
);
|
);
|
||||||
if (n != 0L || wxStrcmp(*ppValue, zDefunkt) == 0)
|
if (zBuf == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
if (n == 0L || wxStrcmp(zBuf, zDefunkt) == 0)
|
||||||
|
return FALSE;
|
||||||
|
zBuf[n-1] = '\0';
|
||||||
}
|
}
|
||||||
|
strcpy((char*)*ppValue, zBuf);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user