]> mj.ucw.cz Git - libucw.git/commitdiff
UTF-8 bug hunted in substring search
authorPavel Charvat <pavel.charvat@netcentrum.cz>
Tue, 4 Apr 2006 09:45:22 +0000 (11:45 +0200)
committerPavel Charvat <pavel.charvat@netcentrum.cz>
Tue, 4 Apr 2006 09:45:22 +0000 (11:45 +0200)
lib/kmp.h

index 0a83dd7b3c4756320cae01c2fb45d9cb04ea6fe5..7d392bf95b4dbf87c338a0676443bc8a922ca969 100644 (file)
--- a/lib/kmp.h
+++ b/lib/kmp.h
@@ -33,7 +33,7 @@
 
 /* Pre-defined input functions */
 
-#define KMP_GET_RAW(pos, c, flags) c=*pos++
+#define KMP_GET_RAW(pos, c, flags) do { uns cc; pos = utf8_get(pos, &cc); c=cc; } while(0)
 
 #define KMP_GET_ASCII(pos, c, flags) do { \
        c = *pos++; \