aboutsummaryrefslogtreecommitdiff
path: root/src/std
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-03-08 00:47:10 +0100
committerdec05eba <dec05eba@protonmail.com>2020-07-25 14:36:46 +0200
commit784cfbe5d88042756dac21fec4b6dac5f1db414e (patch)
treef47a25a7001980d1bdb35af6d2c6419c8fe944c9 /src/std
parent6bef90418f677f5b971a7a597126d743f8198046 (diff)
Modify hash algorithm
Diffstat (limited to 'src/std')
-rw-r--r--src/std/hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/std/hash.c b/src/std/hash.c
index 603149a..8bd08d9 100644
--- a/src/std/hash.c
+++ b/src/std/hash.c
@@ -5,7 +5,7 @@ usize amal_hash_string(const u8 *data, usize size) {
result = 0xdec05eba;
while(size) {
- result ^= *data;
+ result = ((result << 5) + result) ^ *data;
++data;
--size;
}