We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4696

Summary: Incorrect use of GetWindowText() in WIN_CreateWindowFrom()
Product: SDL Reporter: Zebediah Figura <zfigura>
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: trivial    
Priority: P2 CC: icculus
Version: HG 2.1Keywords: target-2.0.10
Hardware: All   
OS: Linux   
Attachments: patch

Description Zebediah Figura 2019-06-25 21:29:22 UTC
Created attachment 3846 [details]
patch

According to the documentation for GetWindowText(), the third parameter is the count of characters including the terminating null:

https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-getwindowtextw

Currently the stored title may be truncated by one character. The attached patch fixes this. I was unable to easily find any documented process of patch submission, so I am attaching it to this bug.
Comment 1 Ryan C. Gordon 2019-06-25 22:29:10 UTC
I’ll take a look at this tonight.
Comment 2 Ryan C. Gordon 2019-06-26 05:29:25 UTC
This patch is now https://hg.libsdl.org/SDL/rev/bd5a067d1fd8, thanks!

--ryan.