Skip to content

Commit

Permalink
Merge pull request #5381 from maron2000/fix_bellcrash
Browse files Browse the repository at this point in the history
Fix potential crash when pasting from clipboard
  • Loading branch information
joncampbell123 authored Jan 7, 2025
2 parents 7da02c3 + 4fb6085 commit 02c7f91
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/misc/clipboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,7 @@ void PasteClipboard(bool bPressed)
{
clipSize=0;
bool ret=Unicode2Ascii(szClipboard);
if(clipSize == 0){CloseClipboard();return;}
unsigned long j=0;
for (size_t i = 0; i < clipSize; ++i) {
if (clipAscii[i] == 9) j++;
Expand Down Expand Up @@ -538,6 +539,7 @@ void PasteClipboard(bool bPressed) {
{
clipSize=0;
bool ret=Unicode2Ascii(szClipboard);
if(clipSize == 0){CloseClipboard();return;}
unsigned long j=0;
for (size_t i = 0; i < clipSize; ++i) {
if (clipAscii[i] == 9) j++;
Expand Down

0 comments on commit 02c7f91

Please sign in to comment.