aboutsummaryrefslogtreecommitdiff
path: root/liblangdet/sentencepiece.c
diff options
context:
space:
mode:
Diffstat (limited to 'liblangdet/sentencepiece.c')
-rw-r--r--liblangdet/sentencepiece.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/liblangdet/sentencepiece.c b/liblangdet/sentencepiece.c
index 6c30ba1..33efab8 100644
--- a/liblangdet/sentencepiece.c
+++ b/liblangdet/sentencepiece.c
@@ -856,7 +856,7 @@ int *tok_spm_encode_with_workspace(const tok_spm_t *tok,
const char *text,
int *out_n_tokens) {
if (out_n_tokens)
- *out_n_tokens = 0;
+ *out_n_tokens = -1;
if (!tok || !ws || !text)
return NULL;
int n = 0;