fa26d661f8
delivery man who is transformed into Captain 'S' after eating radioactive sausages. The game's villain is Dr. Torrebruno, an eminent nuclear physicist with a strange mental disease. The game can be played in Spanish and in English. ok rpointel benoit
29 lines
864 B
Plaintext
29 lines
864 B
Plaintext
$OpenBSD: patch-src_logger_cpp,v 1.1.1.1 2011/06/05 11:13:47 stsp Exp $
|
|
--- src/logger.cpp.orig Fri Apr 10 12:57:23 2009
|
|
+++ src/logger.cpp Sun Jun 5 00:10:03 2011
|
|
@@ -1,6 +1,8 @@
|
|
#include "logger.h"
|
|
#include "filehandling.h"
|
|
|
|
+#include <limits.h>
|
|
+
|
|
int LogInit ()
|
|
{
|
|
char fname[512];
|
|
@@ -37,12 +39,12 @@ int LogEnd ()
|
|
|
|
int GameLogInit (int AMode, int &Fase)
|
|
{
|
|
- char Titulo[128];
|
|
+ char Titulo[PATH_MAX];
|
|
int Ret;
|
|
if (AMode == 1)
|
|
- sprintf (Titulo, "./data/capitan.at%i", Fase);
|
|
+ snprintf (Titulo, PATH_MAX, CAPITAN_DATA_DIR "./data/capitan.at%i", Fase);
|
|
else
|
|
- sprintf (Titulo, "./data/capitan.at%i", (int) (rand() % 2) + 1);
|
|
+ snprintf (Titulo, PATH_MAX, CAPITAN_DATA_DIR "./data/capitan.at%i", (int) (rand() % 2) + 1);
|
|
LogWrite ("Abriendo fichero %s... ", Titulo);
|
|
|
|
if (AMode == 1) {
|