Skip to content

Commit

Permalink
Merge pull request #1235 from berryzplus/feature/amend_pr1034_copy_of…
Browse files Browse the repository at this point in the history
…_wstring

wstringをWCHAR[N]にコピーする処理でNUL終端が付かない不具合を修正
  • Loading branch information
berryzplus authored Apr 23, 2020
2 parents 948ce7e + edf5daf commit 82e4761
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sakura_core/typeprop/CImpExpManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ bool CImpExpRegex::Import( const wstring& sFileName, wstring& sErrMsg )
{
//1行読み込み
wstring line=in.ReadLineW();
line.copy( buff, line.length(), 0 );
line.copy( buff, line.length() + 1, 0 );

if(count >= MAX_REGEX_KEYWORD){
sErrMsg = LS(STR_IMPEXP_REGEX1);
Expand Down
2 changes: 1 addition & 1 deletion sakura_core/typeprop/CPropTypesKeyHelp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ INT_PTR CPropTypesKeyHelp::DispatchEvent(
}
// 開けたなら1行目を取得してから閉じる -> szAbout
std::wstring line=in.ReadLineW();
line.copy( szAbout, line.length(), 0 );
line.copy( szAbout, line.length() + 1, 0 );
in.Close();
}
strcnv(szAbout);
Expand Down

0 comments on commit 82e4761

Please sign in to comment.