fix #777 (debugger loses comments with russian scribbles)

This commit is contained in:
zeromus 2017-02-23 21:58:10 +00:00
parent 089ddeeb5e
commit 9f075c71a3
1 changed files with 4 additions and 2 deletions

View File

@ -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));