Fixed a bug that caused the test button to show up even if no output file string was found in the log.

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1300 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2002-10-04 16:05:51 +00:00
parent 5f34882a62
commit a1bf160506

View file

@ -121,6 +121,7 @@ void EnableItems(HWND hwnd) {
ft.chrg.cpMin = tr.chrg.cpMin = MSG2(EM_FINDTEXT, 0, (LPARAM)&ft) + lstrlen("Processing script file: \"");
ft.lpstrText = "\"";
tr.chrg.cpMax = MSG2(EM_FINDTEXT, 0, (LPARAM)&ft);
if (tr.chrg.cpMin == lstrlen("Processing script file: \"") - 1) tr.chrg.cpMax = tr.chrg.cpMin = 0;
tr.lpstrText = g_input_script = (char *)GlobalAlloc(GPTR, tr.chrg.cpMax-tr.chrg.cpMin+1);
MSG2(EM_GETTEXTRANGE, 0, (WPARAM)&tr);
@ -131,6 +132,7 @@ void EnableItems(HWND hwnd) {
ft.chrg.cpMin = tr.chrg.cpMin = MSG2(EM_FINDTEXT, 0, (LPARAM)&ft) + lstrlen("Output: \"");
ft.lpstrText = "\"";
tr.chrg.cpMax = MSG2(EM_FINDTEXT, 0, (LPARAM)&ft);
if (tr.chrg.cpMin == lstrlen("Output: \"") - 1) tr.chrg.cpMax = tr.chrg.cpMin = 0;
tr.lpstrText = g_output_exe = (char *)GlobalAlloc(GPTR, tr.chrg.cpMax-tr.chrg.cpMin+1);
MSG2(EM_GETTEXTRANGE, 0, (WPARAM)&tr);