New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix #960
Bugfix #960
Changes from all commits
e89c923
6a7485d
4273108
6dbc79b
c7183ce
2538fd6
86fef72
42e5d41
5d65a65
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8031,13 +8031,14 @@ BOOL CALLBACK MultiChoiceDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPA | |
// Determine the number of newlines contained in the message text | ||
{ | ||
int64 offset = -1; | ||
int str_len = wcslen(L"\n"); | ||
|
||
do | ||
{ | ||
offset = FindString ((char *) (bResolve ? GetString(*(pStrOrig+1)) : *(pwStrOrig+1)), | ||
(char *) L"\n", | ||
nMainTextLenInChars * 2, | ||
(int) wcslen (L"\n") * 2, | ||
str_len * 2, | ||
offset + 1); | ||
|
||
newLineSeqCount++; | ||
|
@@ -14552,10 +14553,14 @@ static bool RunAsDesktopUser( | |
goto cleanup; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My previous comment about thise piece of code is still not resolved. |
||
} | ||
|
||
AdjustTokenPrivileges(hThreadToken, FALSE, &tkp, 0, NULL, NULL); | ||
dwLastErr = GetLastError(); | ||
if (ERROR_SUCCESS != dwLastErr) | ||
if (!AdjustTokenPrivileges(hThreadToken, FALSE, &tkp, 0, NULL, NULL)) | ||
{ | ||
dwLastErr = GetLastError(); | ||
goto cleanup; | ||
} | ||
if (GetLastError() == ERROR_NOT_ALL_ASSIGNED) | ||
{ | ||
dwLastErr = ERROR_NOT_ALL_ASSIGNED; | ||
Comment on lines
+14556
to
+14563
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These changes are not really necessary, the previous logic covered all the error paths and did it more concisely at that. |
||
goto cleanup; | ||
} | ||
} | ||
|
@@ -14638,7 +14643,7 @@ static bool RunAsDesktopUser( | |
if (hThreadToken) CloseHandle(hThreadToken); | ||
|
||
if (!RevertToSelf()) | ||
return false; | ||
return false; | ||
|
||
if (!retval) | ||
SetLastError (dwLastErr); | ||
|
@@ -15263,7 +15268,7 @@ void PasswordEditDropTarget::GotLeave(void) | |
DWORD PasswordEditDropTarget::GotEnter(void) | ||
{ | ||
TCHAR szClassName[64]; | ||
DWORD dwStyles; | ||
LONG_PTR dwStyles; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for fixing this. There's another one in |
||
int maxLen; | ||
HWND hChild = WindowFromPoint (m_DropPoint); | ||
// check that we are on password edit control (we use maximum length to correctly identify password fields since they don't always have ES_PASSWORD style (if the the user checked show password) | ||
|
@@ -15668,4 +15673,4 @@ bool OneOfKBsInstalled (const wchar_t* szKBs[], int count) | |
|
||
return bRet; | ||
} | ||
#endif // VC_COMREG | ||
#endif // VC_COMREG | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove this irrelevant whitespace change to avoid polluting the change history. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two still have snake case (or even a mixed one for
str_mszDest
), so my previous comment about variable name casing is still actual. Moreover, the naming of those variables is still misleading (str_input
suggests it's a "string of something we got as an input" or some such, and this is not the case). Usinglen
prefix for the app name string length was good, so I'd suggest to do the same here.In addition I did not repeat the comment for other variables and files for brevity in my previous review, but it's also applicable to other changes in this PR (e.g.
str_len
introduced inDlgcode.c
) - please correct them all.