hash.h: fix std::vector access violation.

Signed-off-by: Tom Li <tomli@tomli.me>
This commit is contained in:
Tom Li 2019-01-04 01:52:54 +08:00
parent f7ae29ccc2
commit ada0c16f70
No known key found for this signature in database
GPG key ID: FAD3EB05E88E8D6D

View file

@ -48,7 +48,7 @@ public:
virtual ~hash_proc() {}
void eat (const std::vector<byte>&a) {
return eat (& (a[0]), & (a[a.size()]));
return eat (a.data(), a.data() + a.size());
}
typedef std::map<std::string, factoryof<hash_proc>*> suite_t;