ext/jaro_winkler/jaro.c in jaro_winkler-1.3.6 vs ext/jaro_winkler/jaro.c in jaro_winkler-1.3.7
- old
+ new
@@ -25,13 +25,13 @@
}
int window_size = long_codes_len/2 - 1;
if(window_size < 0) window_size = 0;
- char short_codes_flag[MAX_WORD_LENGTH];
- char long_codes_flag[MAX_WORD_LENGTH];
- memset(short_codes_flag, 0, MAX_WORD_LENGTH);
- memset(long_codes_flag, 0, MAX_WORD_LENGTH);
+ char short_codes_flag[short_str_len];
+ char long_codes_flag[long_str_len];
+ memset(short_codes_flag, 0, short_str_len);
+ memset(long_codes_flag, 0, long_str_len);
// count number of matching characters
int match_count = 0;
for(int i = 0; i < short_codes_len; i++){
int left = (i >= window_size) ? i - window_size : 0;
\ No newline at end of file