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 - Incorrect use of GetWindowText() in WIN_CreateWindowFrom()
Summary: Incorrect use of GetWindowText() in WIN_CreateWindowFrom()
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.1
Hardware: All Linux
: P2 trivial
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.10
Depends on:
Blocks:
 
Reported: 2019-06-25 21:29 UTC by Zebediah Figura
Modified: 2019-06-26 05:29 UTC (History)
1 user (show)

See Also:


Attachments
patch (592 bytes, patch)
2019-06-25 21:29 UTC, Zebediah Figura
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.