diff options
author | Rick van Schijndel <rol3517@gmail.com> | 2022-06-23 21:11:08 +0200 |
---|---|---|
committer | Rick van Schijndel <rol3517@gmail.com> | 2022-06-23 21:11:08 +0200 |
commit | 2beb929753d28604ccd40057fca295a11640e40e (patch) | |
tree | 0979bb6c77f8fc14929b5d729a5565ad60cd0104 /src/libexpr/eval-cache.cc | |
parent | 16c6c6c963e78aff1911054fe4145b891d8e9fc8 (diff) |
eval-cache: cast rowId to correct type
Prevents errors when running with UBSan:
/nix/store/j5vhrywqmz1ixwhsmmjjxa85fpwryzh0-gcc-11.3.0/include/c++/11.3.0/bits/stl_pair.h:353:4: runtime error: load of value 229, which is not a valid value for type 'AttrType'
Diffstat (limited to 'src/libexpr/eval-cache.cc')
-rw-r--r-- | src/libexpr/eval-cache.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/eval-cache.cc b/src/libexpr/eval-cache.cc index d77b25898..dbfd8e70b 100644 --- a/src/libexpr/eval-cache.cc +++ b/src/libexpr/eval-cache.cc @@ -282,7 +282,7 @@ struct AttrDb auto queryAttribute(state->queryAttribute.use()(key.first)(symbols[key.second])); if (!queryAttribute.next()) return {}; - auto rowId = (AttrType) queryAttribute.getInt(0); + auto rowId = (AttrId) queryAttribute.getInt(0); auto type = (AttrType) queryAttribute.getInt(1); switch (type) { |