Permalink
Browse files

char is unsigned on ARM, fixed it

  • Loading branch information...
SChernykh committed Feb 8, 2019
1 parent d9a0d7c commit 2467990a3e282fa765970afdce80a8799a611fa3
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/crypto/variant4_random_math.h
@@ -166,7 +166,7 @@ static FORCEINLINE void v4_random_math(const struct V4_Instruction* code, v4_reg
}

// If we don't have enough data available, generate more
static FORCEINLINE void check_data(size_t* data_index, const size_t bytes_needed, char* data, const size_t data_size)
static FORCEINLINE void check_data(size_t* data_index, const size_t bytes_needed, int8_t* data, const size_t data_size)
{
if (*data_index + bytes_needed > data_size)
{
@@ -193,7 +193,7 @@ static inline int v4_random_math_init(struct V4_Instruction* code, const uint64_
// Available ALUs for each instruction
const int op_ALUs[V4_INSTRUCTION_COUNT] = { ALU_COUNT_MUL, ALU_COUNT, ALU_COUNT, ALU_COUNT, ALU_COUNT, ALU_COUNT };

char data[32];
int8_t data[32];
memset(data, 0, sizeof(data));
uint64_t tmp = SWAP64LE(height);
memcpy(data, &tmp, sizeof(uint64_t));

0 comments on commit 2467990

Please sign in to comment.