From d407898675b14fbf9b10cd2e23723e9a522686e5 Mon Sep 17 00:00:00 2001 From: omm Date: Tue, 26 Jan 2021 18:27:18 +0200 Subject: [PATCH] 2021-01-26 18:27 UTC+0200 Oleksii Myronenko (m.oleksa ukr.net) * src/debug/dbgtarr.prg * src/debug/dbgthsh.prg ! fixed RTE when press enter in empty array or empty hash https://github.com/harbour/core/pull/225 --- ChangeLog.txt | 6 ++++++ src/debug/dbgtarr.prg | 6 +++++- src/debug/dbgthsh.prg | 7 +++++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index ccd13dd863..37e7b7f3a7 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -7,6 +7,12 @@ Entries may not always be in chronological/commit order. See license at the end of file. */ +2021-01-26 18:27 UTC+0200 Oleksii Myronenko (m.oleksa ukr.net) + * src/debug/dbgtarr.prg + * src/debug/dbgthsh.prg + ! fixed RTE when press enter in empty array or empty hash + https://github.com/harbour/core/pull/225 + 2021-01-25 02:45 UTC+0100 Phil Krylov (phil a t newstar.rinet.ru) * contrib/hbct/dattime3.c ! Fixed building with glibc 2.31+ (stime() is no longer exported). diff --git a/src/debug/dbgtarr.prg b/src/debug/dbgtarr.prg index 81072235cf..b6690cffc9 100644 --- a/src/debug/dbgtarr.prg +++ b/src/debug/dbgtarr.prg @@ -215,7 +215,11 @@ METHOD SetsKeyPressed( nKey, oBrwSets, oWnd, cName, aArray ) CLASS HBDbArray CASE HB_ISOBJECT( aArray[ nSet ] ) __dbgObject( aArray[ nSet ], cName + "[" + hb_ntos( nSet ) + "]" ) CASE HB_ISHASH( aArray[ nSet ] ) - __dbgHashes( aArray[ nSet ], cName + "[" + hb_ntos( nSet ) + "]" ) + IF Len( aArray[ nSet ] ) == 0 + __dbgAlert( "Hash is empty" ) + ELSE + __dbgHashes( aArray[ nSet ], cName + "[" + hb_ntos( nSet ) + "]" ) + ENDIF OTHERWISE ::doGet( oBrwsets, aArray, nSet ) ENDCASE diff --git a/src/debug/dbgthsh.prg b/src/debug/dbgthsh.prg index 2457733bc1..ce48450d90 100644 --- a/src/debug/dbgthsh.prg +++ b/src/debug/dbgthsh.prg @@ -198,7 +198,6 @@ METHOD SetsKeyPressed( nKey, oBrwSets, oWnd, cName, hHash ) CLASS HBDbHash uValue := hb_HValueAt( hHash, nSet ) IF HB_ISHASH( uValue ) - IF Len( uValue ) == 0 __dbgAlert( "Hash is empty" ) ELSE @@ -224,7 +223,11 @@ METHOD SetsKeyPressed( nKey, oBrwSets, oWnd, cName, hHash ) CLASS HBDbHash CASE HB_ISOBJECT( uValue ) __dbgObject( uValue, cName + "[" + HashKeyString( hHash, nSet ) + "]" ) CASE HB_ISARRAY( uValue ) - __dbgArrays( uValue, cName + "[" + HashKeyString( hHash, nSet ) + "]" ) + IF Len( uValue ) == 0 + __dbgAlert( "Array is empty" ) + ELSE + __dbgArrays( uValue, cName + "[" + HashKeyString( hHash, nSet ) + "]" ) + ENDIF OTHERWISE ::doGet( oBrwSets, hHash, nSet ) ENDCASE