diff options
author | Neil <nyamatongwe@gmail.com> | 2019-07-02 08:00:09 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2019-07-02 08:00:09 +1000 |
commit | 23233d77de6a5daf10e0507c54ad1466749cf93c (patch) | |
tree | 6486e1c61839e2c7b641b331b98e552e4a4ff836 /src | |
parent | a7e454314d0db290dd98da6c3a32fef6dff95c98 (diff) | |
download | scintilla-mirror-23233d77de6a5daf10e0507c54ad1466749cf93c.tar.gz |
Bug [#2115]. Backed out changeset: d70ccc4f172a as not undefined behaviour.
Diffstat (limited to 'src')
-rw-r--r-- | src/PositionCache.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx index e9edb84e7..ea281f7ab 100644 --- a/src/PositionCache.cxx +++ b/src/PositionCache.cxx @@ -723,11 +723,10 @@ bool PositionCacheEntry::Retrieve(unsigned int styleNumber_, const char *s_, } unsigned int PositionCacheEntry::Hash(unsigned int styleNumber_, const char *s, unsigned int len_) noexcept { - const unsigned char *us = reinterpret_cast<const unsigned char *>(s); - unsigned int ret = us[0] << 7; + unsigned int ret = s[0] << 7; for (unsigned int i=0; i<len_; i++) { ret *= 1000003; - ret ^= us[i]; + ret ^= s[i]; } ret *= 1000003; ret ^= len_; |