Fix types in frequency_score

This commit is contained in:
Dimitri Lozeve 2020-06-04 12:05:35 +02:00
parent cd7c584e6f
commit a47bcc8f9e
4 changed files with 6 additions and 6 deletions

View file

@ -50,7 +50,7 @@ char *bytes_to_base64(char *out, const unsigned char in[static 1], size_t len) {
return out;
}
double frequency_score(unsigned char *buf, size_t len) {
double frequency_score(const char *buf, size_t len) {
static const double english_freqs[27] = {
0.08167, 0.01492, 0.02782, 0.04253, 0.12702, 0.02228, 0.02015, // A-G
0.06094, 0.06966, 0.00153, 0.00772, 0.04025, 0.02406, 0.06749, // H-N