Skip to content

Commit 0896cef

Browse files
committed
Fix access violation exception
1 parent 247abb4 commit 0896cef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

operators/tokenizer/ugm_kernels.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ struct SpmUgmTokenizer {
522522
ORTX_CXX_API_THROW("[UgmTok]Index out of array bounds in precompiled charsmap!", ORT_RUNTIME_EXCEPTION);
523523
}
524524
const char* prefix_replacement = &prefix_replacements_[longest_prefix_offset];
525-
return {prefix_replacement, static_cast<int>(longest_prefix_length)};
525+
return {prefix_replacement, static_cast<int>(strlen(prefix_replacement))};
526526
} else {
527527
// if yes, return this sequence unmodified
528528
size_t prefix_offset = ustring::UTF8Len(input_view[0]);

0 commit comments

Comments
 (0)