Changed amx structure for compatibility

This commit is contained in:
David Anderson 2004-09-03 06:53:00 +00:00
parent 580b20e720
commit 37a5a38be5
3 changed files with 8 additions and 8 deletions

View File

@ -217,11 +217,9 @@ typedef struct tagAMX {
cell reset_stk PACKED;
cell reset_hea PACKED;
cell sysreq_d PACKED; /* relocated address/value for the SYSREQ.D opcode */
#if defined JIT
/* support variables for the JIT */
int reloc_size PACKED; /* required temporary buffer for relocations */
long code_size PACKED; /* estimated memory footprint of the native code */
#endif
int reloc_size PACKED; /* required temporary buffer for relocations */
long code_size PACKED; /* estimated memory footprint of the native code */
} AMX;
/* The AMX_HEADER structure is both the memory format as the file format. The

View File

@ -40,6 +40,10 @@
#endif
#include "amxmodx.h"
#ifndef __linux__
#define vsnprintf _vsnprintf
#endif
CLog::CLog()
{
m_LogType = 0;
@ -158,7 +162,7 @@ void CLog::Log(const char *fmt, ...)
va_list arglst;
va_start(arglst, fmt);
vsprintf(msg, fmt, arglst);
vsnprintf(msg, 3071, fmt, arglst);
va_end(arglst);
FILE *pF;
@ -203,7 +207,7 @@ void CLog::Log(const char *fmt, ...)
char msg[3072];
va_list arglst;
va_start(arglst, fmt);
vsprintf(msg, fmt, arglst);
vsnprintf(msg, 3071, fmt, arglst);
va_end(arglst);
ALERT(at_logged, "%s\n", msg);
}

View File

@ -204,11 +204,9 @@ typedef struct tagAMX {
cell reset_stk PACKED;
cell reset_hea PACKED;
cell sysreq_d PACKED; /* relocated address/value for the SYSREQ.D opcode */
#if defined JIT
/* support variables for the JIT */
int reloc_size PACKED; /* required temporary buffer for relocations */
long code_size PACKED; /* estimated memory footprint of the native code */
#endif
} AMX;
enum {