Merge revision 514 changes:

- Windows: Fix crash in cefclient when entering long URLs via the address bar (issue #532).

git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/963@516 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2012-02-21 22:51:37 +00:00
parent fdcea1583c
commit 2fd388c036

View File

@@ -233,7 +233,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{ {
// When the user hits the enter key load the URL // When the user hits the enter key load the URL
CefRefPtr<CefBrowser> browser = g_handler->GetBrowser(); CefRefPtr<CefBrowser> browser = g_handler->GetBrowser();
wchar_t strPtr[MAX_URL_LENGTH] = {0}; wchar_t strPtr[MAX_URL_LENGTH+1] = {0};
*((LPWORD)strPtr) = MAX_URL_LENGTH; *((LPWORD)strPtr) = MAX_URL_LENGTH;
LRESULT strLen = SendMessage(hWnd, EM_GETLINE, 0, (LPARAM)strPtr); LRESULT strLen = SendMessage(hWnd, EM_GETLINE, 0, (LPARAM)strPtr);
if (strLen > 0) { if (strLen > 0) {