Fix multi-leg promotions
[xboard.git] / winboard / help.c
index d10f9ab..e1e0345 100644 (file)
@@ -1,7 +1,7 @@
 /*\r
  * help.h\r
  *\r
- * Copyright 2009 Free Software Foundation, Inc.\r
+ * Copyright 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Free Software Foundation, Inc.\r
  * ------------------------------------------------------------------------\r
  *\r
  * GNU XBoard is free software: you can redistribute it and/or modify\r
@@ -24,6 +24,7 @@
 \r
 #include <windows.h>\r
 #include <stdio.h>\r
+#include "config.h"
 #include "help.h"
 \r
 FILE *debugFP;\r
@@ -60,7 +61,7 @@ HtmlHelp( HWND hwnd, LPCSTR helpFile, UINT action, DWORD_PTR data )
        siStartInfo.hStdOutput = NULL;\r
        siStartInfo.hStdError = debugFP;\r
 \r
-       sprintf(buf, "Hh.exe %s", helpFile);\r
+       snprintf(buf, sizeof(buf)/sizeof(buf[0]),"Hh.exe %s", helpFile);\r
 \r
        // ignore the other parameters; just start the viewer with the help file\r
        if(  CreateProcess(NULL,\r