CF_UNICODETEXT形式のクリップボードデータをサクラエディタにペーストしたときに u+0000 が追加される不具合を修正#2095
Merged
beru merged 2 commits intoJun 27, 2025
Merged
Conversation
|
✅ Build sakura 1.0.4592 completed (commit 744f673e13 by @beru) |
|
m-tmatma
approved these changes
Jun 27, 2025
Contributor
Author
|
レビューありがとうございました。Mergeします。 |
berryzplus
reviewed
Sep 29, 2025
| if( hUnicode != NULL ){ | ||
| wchar_t* szData = static_cast<wchar_t*>(::GlobalLock(hUnicode)); | ||
| cmemBuf->Append( szData, GlobalSize(hUnicode)/2); | ||
| cmemBuf->Append( szData, GlobalSize(hUnicode) / 2 - 1); |
Contributor
There was a problem hiding this comment.
なんとも言えないけど正しくはこんな感じなんでしょうね。
cmemBuf->Append( szData, wcsnlen(szData, GlobalSize(hUnicode) / 2))GlobalSizeの戻り値を信用できるかどうかは微妙なので、自前でNUL終端を検索してやるのがベターです。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



PR対象
カテゴリ
PR の背景
#2094
仕様・動作説明
PR の影響範囲
テスト内容
関連 issue, PR
#2094
参考資料