diff --git a/docs/Debugger_Changelog.txt b/docs/Debugger_Changelog.txt index fbd7e33f..6bf6fa7c 100644 --- a/docs/Debugger_Changelog.txt +++ b/docs/Debugger_Changelog.txt @@ -1,4 +1,8 @@ /* +2.9.2.1 Added: Error message when trying to add a symbol > 51 characters. + +2.9.2.0 Released with AppleWin 1.30.20.0 + 2.9.2.0 Fixed: Debugger: Step-over WAIT can fail #1194 2.9.1.26 Fixed: When adding symbols list the address first then the name for readability 2.9.1.25 Fixed: R P ## wasn't setting P flag status register. diff --git a/source/Debugger/Debug.cpp b/source/Debugger/Debug.cpp index a616b030..74e11de7 100644 --- a/source/Debugger/Debug.cpp +++ b/source/Debugger/Debug.cpp @@ -53,7 +53,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #define MAKE_VERSION(a,b,c,d) ((a<<24) | (b<<16) | (c<<8) | (d)) // See /docs/Debugger_Changelog.txt for full details - const int DEBUGGER_VERSION = MAKE_VERSION(2,9,2,0); + const int DEBUGGER_VERSION = MAKE_VERSION(2,9,2,1); // Public _________________________________________________________________________________________ diff --git a/source/Debugger/Debugger_Symbols.cpp b/source/Debugger/Debugger_Symbols.cpp index 2afb02ea..3532d5a4 100644 --- a/source/Debugger/Debugger_Symbols.cpp +++ b/source/Debugger/Debugger_Symbols.cpp @@ -827,7 +827,8 @@ void SymbolUpdate ( SymbolTable_Index_e eSymbolTable, const char *pSymbolName, W if (bRemoveSymbol) pSymbolName = g_aArgs[2].sArg; - if (_tcslen( pSymbolName ) < MAX_SYMBOLS_LEN) + size_t nSymLen = _tcslen( pSymbolName ); + if (nSymLen < MAX_SYMBOLS_LEN) { WORD nAddressPrev; int iTable; @@ -888,6 +889,16 @@ void SymbolUpdate ( SymbolTable_Index_e eSymbolTable, const char *pSymbolName, W ); } } + else + ConsolePrintFormat( + CHC_ERROR "Error: " + CHC_DEFAULT "Symbol length " + CHC_NUM_DEC "%d " + CHC_ARG_SEP "> " + CHC_NUM_DEC "%d " + , (int) nSymLen + , MAX_SYMBOLS_LEN + ); } // Syntax: