1
0
mirror of https://github.com/biergaizi/codecrypt synced 2024-06-16 11:58:16 +00:00

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 a5a1d6190c
commit 538d26900b
No known key found for this signature in database
GPG Key ID: FAD3EB05E88E8D6D

@ -48,7 +48,7 @@ public:
virtual ~hash_proc() {} virtual ~hash_proc() {}
void eat (const std::vector<byte>&a) { 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; typedef std::map<std::string, factoryof<hash_proc>*> suite_t;