ext/rmmseg/word.h in rmmseg-cpp-0.2.7 vs ext/rmmseg/word.h in rmmseg-cpp-0.2.9

- old
+ new

@@ -26,14 +26,14 @@ int freq=0, int nbytes=-1) { if (freq > USHRT_MAX) freq = USHRT_MAX; /* avoid overflow */ if (nbytes == -1) - nbytes = strlen(text); + nbytes = std::strlen(text); Word *w = static_cast<Word *>(pool_alloc(sizeof(Word) + nbytes+1 - word_embed_len)); - w->nbytes = std::strlen(text); + w->nbytes = nbytes; w->length = length; w->freq = freq; std::strncpy(w->text, text, nbytes); w->text[nbytes] = '\0'; return w;