[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] GSoC-2017-kushal f5a2bc2 29/70: Fixing error in hash compari
From: |
Kushal K S V S |
Subject: |
[freetype2] GSoC-2017-kushal f5a2bc2 29/70: Fixing error in hash comparison |
Date: |
Sun, 18 Mar 2018 11:21:12 -0400 (EDT) |
branch: GSoC-2017-kushal
commit f5a2bc2e6081e41a7b4364d5594f5b1f0b1d75a6
Author: Kushal K S V S <address@hidden>
Commit: Kushal K S V S <address@hidden>
Fixing error in hash comparison
---
tests/make_png/bitmap.h | 4 ++--
tests/make_png/make_sprite.c | 12 +-----------
2 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/tests/make_png/bitmap.h b/tests/make_png/bitmap.h
index 837de5e..27cc569 100644
--- a/tests/make_png/bitmap.h
+++ b/tests/make_png/bitmap.h
@@ -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 {
diff --git a/tests/make_png/make_sprite.c b/tests/make_png/make_sprite.c
index 3a7e8ab..e63d903 100644
--- a/tests/make_png/make_sprite.c
+++ b/tests/make_png/make_sprite.c
@@ -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 );
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] GSoC-2017-kushal f5a2bc2 29/70: Fixing error in hash comparison,
Kushal K S V S <=