mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-06 04:05:11 +08:00
3rdparty: add MultiEmulator by 2010kohtep
* patched to be portable, turned into a static library * integrated to the engine
This commit is contained in:
12
3rdparty/MultiEmulator/src/StrUtils.cpp
vendored
Normal file
12
3rdparty/MultiEmulator/src/StrUtils.cpp
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
#include "StrUtils.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
void CreateRandomString(char *pszDest, int nLength)
|
||||
{
|
||||
static const char c_szAlphaNum[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
|
||||
for (int i = 0; i < nLength; ++i)
|
||||
pszDest[i] = c_szAlphaNum[rand() % (sizeof(c_szAlphaNum) - 1)];
|
||||
|
||||
pszDest[nLength] = '\0';
|
||||
}
|
||||
Reference in New Issue
Block a user