diff options
| author | ame <[email protected]> | 2023-11-05 01:06:23 -0600 |
|---|---|---|
| committer | ame <[email protected]> | 2023-11-05 01:06:23 -0600 |
| commit | d062e57c154b2bed76276d52681577028e859677 (patch) | |
| tree | fe559ba7857d6dad1171571c265d88e99edde10a /src/hash/fletcher.c | |
| parent | 5cd20516567da82c60b5513c732e23db6918a4b6 (diff) | |
tests & hash fixes
Diffstat (limited to 'src/hash/fletcher.c')
| -rw-r--r-- | src/hash/fletcher.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hash/fletcher.c b/src/hash/fletcher.c index 2ed7e42..0d82fd0 100644 --- a/src/hash/fletcher.c +++ b/src/hash/fletcher.c @@ -40,7 +40,7 @@ int l_fletcher32(lua_State* L){ char digest[32]; uint32_t u = i_fletcher32(a, len); - sprintf(digest,"%x",u); + sprintf(digest,"%08x",u); lua_pushstring(L, digest); return 1; @@ -54,7 +54,7 @@ int l_fletcher16(lua_State* L){ char digest[16]; uint16_t u = i_fletcher16(a, len); - sprintf(digest,"%x",u); + sprintf(digest,"%04x",u); lua_pushstring(L, digest); return 1; @@ -68,7 +68,7 @@ int l_fletcher8(lua_State* L){ char digest[8]; uint8_t u = i_fletcher8(a, len); - sprintf(digest,"%x",u); + sprintf(digest,"%02x",u); lua_pushstring(L, digest); return 1; |
