Fixing error in hash comparison

GSoC-2017-kushal
Kushal K S V S 8 years ago
parent f03d33e195
commit f5a2bc2e60
  1. 4
      tests/make_png/bitmap.h
  2. 12
      tests/make_png/make_sprite.c

@ -23,11 +23,11 @@
#define MAX(a, b) ((a) > (b) ? (a) : (b))
typedef struct { // To store 32bit Hash
FT_UInt32 hash[1];
char hash[4];
}HASH_32;
typedef struct { // To store 128bit Hash
FT_UInt32 hash[4];
char hash[16];
}HASH_128;
typedef struct {

@ -351,17 +351,7 @@ int main(int argc, char const *argv[])
base_murmur = Generate_Hash_x64_128(base_bitmap,base_murmur);
test_murmur = Generate_Hash_x64_128(test_bitmap,test_murmur);
sprintf(base_hash, "%08x%08x%08x%08x",base_murmur->hash[0],
base_murmur->hash[1],
base_murmur->hash[2],
base_murmur->hash[3]);
sprintf(test_hash, "%08x%08x%08x%08x",test_murmur->hash[0],
test_murmur->hash[1],
test_murmur->hash[2],
test_murmur->hash[3]);
Is_Different = strcmp(base_hash, test_hash);
Is_Different = strcmp(base_murmur->hash, test_murmur->hash);
Base_Bitmap_Init( &base_target );
Test_Bitmap_Init( &test_target );

Loading…
Cancel
Save