[PR #4117] [CLOSED] [Trivial] Fixed GetMessage errors being ignored #25642

Open
opened 2026-01-31 09:10:50 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/4117
Author: @lhecker
Created: 1/5/2020
Status: Closed

Base: masterHead: getmessage-fix


📝 Commits (1)

  • 120d9ee Fixed GetMessage errors being ignored

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 src/cascadia/WindowsTerminal/main.cpp (+2 -2)

📄 Description

Summary of the Pull Request

I happened to notice that the GetMessage() return value is not being checked properly. It will be -1 in case of an error even if the return type is a BOOL.

PR Checklist

  • Closes #xxx
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments

See: https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getmessagew#return-value
I've also taken the liberty to specify the W suffix directly.

Validation Steps Performed

The app still works. 😄


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/4117 **Author:** [@lhecker](https://github.com/lhecker) **Created:** 1/5/2020 **Status:** ❌ Closed **Base:** `master` ← **Head:** `getmessage-fix` --- ### 📝 Commits (1) - [`120d9ee`](https://github.com/microsoft/terminal/commit/120d9eec11ce243ad7934134c92b955e2ce2c1db) Fixed GetMessage errors being ignored ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/WindowsTerminal/main.cpp` (+2 -2) </details> ### 📄 Description ## Summary of the Pull Request I happened to notice that the `GetMessage()` return value is not being checked properly. It will be -1 in case of an error even if the return type is a `BOOL`. ## PR Checklist * [ ] Closes #xxx * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [x] Tests added/passed * [ ] Requires documentation to be updated * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx ## Detailed Description of the Pull Request / Additional comments See: https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getmessagew#return-value I've also taken the liberty to specify the `W` suffix directly. ## Validation Steps Performed The app still works. 😄 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:10:50 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#25642