From 3086ba4ea26e11069691e551a294e4ce55e32810 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 30 Jun 2003 08:38:24 +0000 Subject: [PATCH] fix utf8_is_valid --- stepmania/src/RageUtil.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stepmania/src/RageUtil.cpp b/stepmania/src/RageUtil.cpp index cd92805d68..274cafdece 100644 --- a/stepmania/src/RageUtil.cpp +++ b/stepmania/src/RageUtil.cpp @@ -774,6 +774,8 @@ bool utf8_is_valid(const CString &str) int len = utf8_get_char_len(str.c_str() + pos); if(len == -1) return false; + if( utf8_get_char( str.c_str() + pos ) == INVALID_CHAR ) + return false; pos += len; }