Skip to content

Commit

Permalink
stack thrashing error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Ondov committed Nov 2, 2015
1 parent 61dfc47 commit 058b01c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mash/hash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ hash_u getHash(const char * seq, int length)
//for ( int i = 0; i < length; i++ ) { cout << *(seq + i); } cout << endl;

bool use64 = length > 16;
char data[use64 ? 8 : 4];

#ifdef ARCH_32
char data[use64 ? 8 : 4];
MurmurHash3_x86_32(seq, length > 16 ? 16 : length, seed, data);
if ( use64 )
{
MurmurHash3_x86_32(seq + 16, length - 16, seed, data + 4);
}
#else
char data[8];
MurmurHash3_x64_128(seq, length, seed, data);
#endif

Expand Down

0 comments on commit 058b01c

Please sign in to comment.