Empty pItem test added

This commit is contained in:
Eddie Runia
1999-05-14 22:49:55 +00:00
parent e456fe3f7f
commit f99c2417b3
2 changed files with 6 additions and 2 deletions

View File

@@ -1,3 +1,7 @@
19990514-23:45 CET Eddie Runia
* source/rtl/set.c
IS_STRING and IS_LOGICAL called without checking for empty pItem.
19990514-22:15 CET Eddie Runia
* tests/working/set.ch
added

View File

@@ -55,8 +55,8 @@ HARBOUR HB_SETCENTURY (void)
* Then change the setting if the parameter is a logical value, or is
* either "ON" or "OFF" (regardless of case)
*/
if (IS_LOGICAL (pItem)) hb_set_century = pItem->value.iLogical;
else if (IS_STRING (pItem))
if ( pItem && IS_LOGICAL (pItem)) hb_set_century = pItem->value.iLogical;
else if ( pItem && IS_STRING (pItem))
{
if (pItem->wLength == 2 && toupper (pItem->value.szText [0]) == 'O'
&& toupper (pItem->value.szText [1]) == 'N')