Skip to content

Commit fe52796

Browse files
committed
RollingHash: Bugfix - init to 0 explicitly added
1 parent 889aa57 commit fe52796

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Library/Miscellanious/RollingHash.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ struct RollingHash {
2020
#define sz(x) ((int)x.size())
2121
vector<ModBasedHashInt> hash, power;
2222
HashInt C;
23-
RollingHash(string& str, HashInt Co) : hash(sz(str)+1), power(hash) {
23+
RollingHash(string& str, HashInt Co) : hash(sz(str)+1, 0), power(hash) {
2424
C = Co;
2525
power[0] = 1;
2626
for(int i=0; i<sz(str); i++) {

0 commit comments

Comments
 (0)