Skip to content

[pull] develop from MonoGame:develop#248

Merged
pull[bot] merged 3 commits intoMu-L:developfrom
MonoGame:develop
Jan 22, 2026
Merged

[pull] develop from MonoGame:develop#248
pull[bot] merged 3 commits intoMu-L:developfrom
MonoGame:develop

Conversation

@pull
Copy link
Copy Markdown

@pull pull bot commented Jan 22, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

dellis1972 and others added 3 commits January 22, 2026 11:10
Disable VSCode based CoPilot features so that contributors who need to
use CoPilot for work or other projects do not need to disable it
manually.

### Contributor Declaration

- [x] I certify that no LLM's were used to generate any code or
documentation in this contribution.
Add a new `FontImporter` in which you can directly specify the
properties that would otherwise go into a .spritefont file.

### Contributor Declaration

- [x] I certify that no LLM's were used to generate any code or
documentation in this contribution.
Fixes #9011 

### Description of Change

The `StringBuilder` in `HandleDropMessage` was allocated with a buffer
size of `buffSize`, but the `cch` parameter passed to `DragQueryFile` is
`buffSize + 1` (to account for the null terminator).

This mismatch could cause the last character of file paths to be
truncated on some configurations, as reported in the issue.

The fix ensures the `StringBuilder` capacity matches the expected buffer
size passed to the Win32 API.

**Before:**
```csharp
StringBuilder builder = new StringBuilder((int)buffSize);
DragQueryFile(hdrop, i, builder, buffSize + 1);
```
**After:**
```csharp
StringBuilder builder = new StringBuilder((int)buffSize + 1);
DragQueryFile(hdrop, i, builder, buffSize + 1);
```

Co-authored-by: Tom Spilman <tom@sickheadgames.com>
@pull pull bot locked and limited conversation to collaborators Jan 22, 2026
@pull pull bot added the ⤵️ pull label Jan 22, 2026
@pull pull bot merged commit 3f4423b into Mu-L:develop Jan 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants