X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=gui.cpp;h=b1174d124a17714cfaedb7f288dae6368f5e344e;hb=63363fbc93ec23e1673113029e819c1a55dd7967;hp=4461e8c6b4127f22dbe0def018426261fda0fb4f;hpb=e437fc1db29fc193b11061c9c0e54f4b5fcc861e;p=nssm.git diff --git a/gui.cpp b/gui.cpp index 4461e8c..b1174d1 100644 --- a/gui.cpp +++ b/gui.cpp @@ -58,7 +58,7 @@ void centre_window(HWND window) { /* Centre window */ x = (desktop_size.right - size.right) / 2; y = (desktop_size.bottom - size.bottom) / 2; - MoveWindow(window, x, y, size.right, size.bottom, 0); + MoveWindow(window, x, y, size.right - size.left, size.bottom - size.top, 0); } /* Install the service */ @@ -67,7 +67,7 @@ int install(HWND window) { /* Check parameters in the window */ char name[STRING_SIZE]; - char exe[MAX_PATH]; + char exe[EXE_LENGTH]; char flags[STRING_SIZE]; /* Get service name */