1
mirror of https://github.com/hashcat/hashcat synced 2024-12-27 05:13:45 +01:00

Switch back to rand().

rand_s is broken in AppVeyor.
This commit is contained in:
Rosen Penev 2017-07-29 15:54:20 -07:00
parent 3c530a48c4
commit 9736782411
2 changed files with 1 additions and 6 deletions

View File

@ -250,13 +250,11 @@ CFLAGS_CROSS_WIN32 += -I$(OPENCL_HEADERS_KHRONOS)/
CFLAGS_CROSS_WIN32 += -I$(WIN_ICONV_32)/include/
CFLAGS_CROSS_WIN32 += -m32
CFLAGS_CROSS_WIN32 += -DWITH_HWMON
CFLAGS_CROSS_WIN32 += -D_CRT_RAND_S
CFLAGS_CROSS_WIN64 := $(CFLAGS)
CFLAGS_CROSS_WIN64 += -I$(OPENCL_HEADERS_KHRONOS)/
CFLAGS_CROSS_WIN64 += -I$(WIN_ICONV_64)/include/
CFLAGS_CROSS_WIN64 += -m64
CFLAGS_CROSS_WIN64 += -DWITH_HWMON
CFLAGS_CROSS_WIN64 += -D_CRT_RAND_S
LFLAGS_CROSS_LINUX32 := $(LFLAGS)
LFLAGS_CROSS_LINUX32 += -lpthread

View File

@ -381,10 +381,7 @@ u32 get_random_num (const u32 min, const u32 max)
#if defined (_WIN)
u32 r;
rand_s(&r);
return ((r % (max - min)) + min);
return (((u32) rand () % (max - min)) + min);
#else