mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-08 19:08:35 +00:00
Moved sm_memtable files in sqlite extension to sdk directory (to be consistent with topmenus) Some extension source files had an incorrect extension name in their headers Updated copyright year on some rarely altered files --HG-- branch : sourcemod-1.0.x extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/sourcemod-1.0.x%402038
39 lines
825 B
C++
39 lines
825 B
C++
/**
|
|
* vim: set ts=4 :
|
|
* ======================================================
|
|
* Metamod:Source Stub Plugin
|
|
* Written by AlliedModders LLC.
|
|
* ======================================================
|
|
*
|
|
* This software is provided 'as-is', without any express or implied warranty.
|
|
* In no event will the authors be held liable for any damages arising from
|
|
* the use of this software.
|
|
*
|
|
* This stub plugin is public domain.
|
|
*
|
|
* Version: $Id$
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <stdarg.h>
|
|
#include "stub_util.h"
|
|
|
|
size_t UTIL_Format(char *buffer, size_t maxlength, const char *fmt, ...)
|
|
{
|
|
va_list ap;
|
|
|
|
va_start(ap, fmt);
|
|
size_t len = vsnprintf(buffer, maxlength, fmt, ap);
|
|
va_end(ap);
|
|
|
|
if (len >= maxlength)
|
|
{
|
|
len = maxlength - 1;
|
|
buffer[len] = '\0';
|
|
}
|
|
|
|
return len;
|
|
}
|
|
|
|
|