diff options
| author | Nathan Moinvaziri <nathan@nathanm.com> | 2021-12-26 19:56:12 -0800 |
|---|---|---|
| committer | Hans Kristian Rosbach <hk-github@circlestorm.org> | 2022-01-08 14:33:19 +0100 |
| commit | 5bc87f1581c4475669427a57b1a3b60bf9d145f2 (patch) | |
| tree | 9993c4fddcf71260dd9ecd06c03a9a3349281afb /insert_string_tpl.h | |
| parent | faf34c76a43b3d40c11265d2b31ed826f6a84cdb (diff) | |
| download | Project-Tick-5bc87f1581c4475669427a57b1a3b60bf9d145f2.tar.gz Project-Tick-5bc87f1581c4475669427a57b1a3b60bf9d145f2.zip | |
Use memcpy for unaligned reads.
Co-authored-by: Matija Skala <mskala@gmx.com>
Diffstat (limited to 'insert_string_tpl.h')
| -rw-r--r-- | insert_string_tpl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/insert_string_tpl.h b/insert_string_tpl.h index ad88275bfc..7d3e46c897 100644 --- a/insert_string_tpl.h +++ b/insert_string_tpl.h @@ -31,7 +31,7 @@ #ifndef HASH_CALC_READ # ifdef UNALIGNED_OK # define HASH_CALC_READ \ - val = *(uint32_t *)(strstart); + memcpy(&val, strstart, sizeof(val)); # else # define HASH_CALC_READ \ val = ((uint32_t)(strstart[0])); \ |
