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

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@514 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2012-02-21 22:50:08 +00:00
parent 9114952cfb
commit b5516ace67

View File

@ -226,7 +226,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
if (wParam == VK_RETURN && g_handler.get()) {
// When the user hits the enter key load the URL
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;
LRESULT strLen = SendMessage(hWnd, EM_GETLINE, 0, (LPARAM)strPtr);
if (strLen > 0) {