commit | 7acb4ce5b95b32eb4b03fcc824b99837e967232d | [log] [tgz] |
---|---|---|
author | swissChili <swisschili@fastmail.com> | Sun Aug 16 20:16:10 2020 -0700 |
committer | swissChili <swisschili@fastmail.com> | Sun Aug 16 20:16:10 2020 -0700 |
tree | fbc475527d34527201affac9683730e3e5e3c581 | |
parent | a4f49b5a14bf5e119a66633813deab5f594ee239 [diff] [blame] |
Fixed bug with line numbers and strtok()
diff --git a/as/hash.c b/as/hash.c index df4fec0..297d246 100644 --- a/as/hash.c +++ b/as/hash.c
@@ -2,13 +2,13 @@ uint32_t hash(char *str) { - uint32_t hash = 5381; - char c; + uint32_t hash = 5381; + char c; - while (c = *str++) - { - hash = (hash << 5) + hash + c; - } + while (c = *str++) + { + hash = (hash << 5) + hash + c; + } - return hash; + return hash; }