From 9e792a6d2aa4c226ec48dbcf15b6c137dc0a67e2 Mon Sep 17 00:00:00 2001 From: Luca Rossetto Date: Mon, 25 Jul 2022 08:39:53 +0200 Subject: [PATCH] Fix for ClipTokenizer (#323) --- build.gradle | 2 +- .../org/vitrivr/cineast/core/util/text/ClipTokenizer.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 37d938c04..3c439b03b 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ allprojects { group = 'org.vitrivr' /* Our current version, on dev branch this should always be release+1-SNAPSHOT */ - version = '3.12.0' + version = '3.12.1' apply plugin: 'java-library' apply plugin: 'maven-publish' diff --git a/cineast-core/src/main/java/org/vitrivr/cineast/core/util/text/ClipTokenizer.java b/cineast-core/src/main/java/org/vitrivr/cineast/core/util/text/ClipTokenizer.java index a4bcf5a25..1f1ef5e78 100644 --- a/cineast-core/src/main/java/org/vitrivr/cineast/core/util/text/ClipTokenizer.java +++ b/cineast-core/src/main/java/org/vitrivr/cineast/core/util/text/ClipTokenizer.java @@ -215,8 +215,8 @@ public long[] clipTokenize(String text) { for (int i = 0; i < tokenCount; ++i) { arr[i + 1] = (long) tokens.get(i); } - if (tokenCount < arr.length) { - arr[tokenCount] = end; + if (tokenCount + 1 < arr.length) { + arr[tokenCount + 1] = end; } return arr; }