From f99c2417b35df268f75ad6027aec6be1937b6fd5 Mon Sep 17 00:00:00 2001 From: Eddie Runia Date: Fri, 14 May 1999 22:49:55 +0000 Subject: [PATCH] Empty pItem test added --- harbour/ChangeLog | 4 ++++ harbour/source/rtl/set.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index b9c59f80f8..7c7a1ff790 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -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 diff --git a/harbour/source/rtl/set.c b/harbour/source/rtl/set.c index 3a9065e8d7..3b0fbdde86 100644 --- a/harbour/source/rtl/set.c +++ b/harbour/source/rtl/set.c @@ -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')