From b6474b5cdbf870725371b32670c9dc28671e394c Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Thu, 9 Aug 2012 01:36:36 -0400 Subject: fixes for new word api --- decoder/ff_charset.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'decoder/ff_charset.cc') diff --git a/decoder/ff_charset.cc b/decoder/ff_charset.cc index 33afc1a7..472de82b 100644 --- a/decoder/ff_charset.cc +++ b/decoder/ff_charset.cc @@ -7,9 +7,9 @@ using namespace std; NonLatinCount::NonLatinCount(const string& param) : FeatureFunction(), fid_(FD::Convert("NonLatinCount")) {} -bool ContainsNonLatin(const char* word) { - int cur = 0; - while(word[cur]) { +bool ContainsNonLatin(const string& word) { + unsigned cur = 0; + while(cur < word.size()) { const int size = UTF8Len(word[cur]); if (size > 1) return true; cur += size; -- cgit v1.2.3