X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=gui.cpp;h=83f216593ece133e8550c70a786027d55e86e0a2;hb=ab747b344a34bdd9128c8b84cf9fde016f6bc308;hp=c143162380c0900c4e3383b4cd53003504f5c258;hpb=0ac37dac5807d10287e6f2ff78aa3c9c20e24114;p=nssm.git diff --git a/gui.cpp b/gui.cpp index c143162..83f2165 100644 --- a/gui.cpp +++ b/gui.cpp @@ -6,7 +6,7 @@ int nssm_gui(int resource, char *name) { /* Create window */ HWND dlg = CreateDialog(0, MAKEINTRESOURCE(resource), 0, install_dlg); if (! dlg) { - snprintf(blurb, sizeof(blurb), "CreateDialog() failed with error code %d", GetLastError()); + _snprintf(blurb, sizeof(blurb), "CreateDialog() failed with error code %d", GetLastError()); MessageBox(0, blurb, NSSM, MB_OK); return 1; } @@ -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 */ @@ -133,7 +133,7 @@ int remove(HWND window) { /* Confirm */ char blurb[MAX_PATH]; - if (snprintf(blurb, sizeof(blurb), "Remove the \"%s\" service?", name) < 0) { + if (_snprintf(blurb, sizeof(blurb), "Remove the \"%s\" service?", name) < 0) { if (MessageBox(0, "Remove the service?", NSSM, MB_YESNO) != IDYES) return 0; } else if (MessageBox(0, blurb, NSSM, MB_YESNO) != IDYES) return 0;