商城购买修正

This commit is contained in:
小疯
2022-09-21 16:28:11 +08:00
parent 34af6a1936
commit 627bf43ee3
9 changed files with 220 additions and 211 deletions

View File

@@ -11,6 +11,15 @@
namespace Utils
{
static int Rand(int v_min, int v_max)
{
int rNum = 0;
srand((unsigned int)time(0));
for (int i = 0; i < 31; i++)
rNum |= (rand() & 1) << i;
return v_min + rNum % (v_max - v_min + 1);
}
static void* alloc(size_t len)
{
int fd = open("/dev/zero", O_RDONLY);