From 9f075c71a300484d28795b5dd6fc8ed10a07bb57 Mon Sep 17 00:00:00 2001 From: zeromus Date: Thu, 23 Feb 2017 21:58:10 +0000 Subject: [PATCH] fix #777 (debugger loses comments with russian scribbles) --- trunk/src/drivers/win/debuggersp.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/trunk/src/drivers/win/debuggersp.cpp b/trunk/src/drivers/win/debuggersp.cpp index d06dd822..170d07f1 100644 --- a/trunk/src/drivers/win/debuggersp.cpp +++ b/trunk/src/drivers/win/debuggersp.cpp @@ -1,4 +1,4 @@ -/* FCEUXD SP - NES/Famicom Emulator +/* FCEUXD SP - NES/Famicom Emulator * * Copyright notice for this file: * Copyright (C) 2005 Sebastian Porst @@ -238,7 +238,7 @@ int parseLine(char* line, Name* n) line = pos + 1; - if (*line > 0x0D) + if ((u8)*line > 0x0D) { if (strlen(line) > NL_MAX_MULTILINE_COMMENT_LEN) line[NL_MAX_MULTILINE_COMMENT_LEN + 1] = 0; @@ -911,6 +911,8 @@ BOOL CALLBACK SymbolicNamingCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM GetDlgItemText(hwndDlg, IDC_SYMBOLIC_NAME, newName, NL_MAX_NAME_LEN + 1); char newComment[NL_MAX_MULTILINE_COMMENT_LEN + 1] = {0}; GetDlgItemText(hwndDlg, IDC_SYMBOLIC_COMMENT, newComment, NL_MAX_MULTILINE_COMMENT_LEN + 1); + strcpy(newComment,"\xa0\xa0\xa0\xa0\xa0HI\xa0\xa0\xa0\xa0"); + strcpy(newName,"\xa0\xa0\xa0\xa0NAME\xa0\xa0\xa0\xa0"); AddNewSymbolicName(newAddress, newOffset, newName, newComment); WriteNameFileToDisk(generateNLFilenameForAddress(newAddress), getNamesPointerForAddress(newAddress));