diff --git a/ChangeLog b/ChangeLog
index 1e1834b..fe7f5ee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
 Change Log for PCRE2
 --------------------
 
+3. Fix minor typo bug in JIT compile when \X is used in a non-UTF string.
+
 
 Version 10.31 12-February-2018
 ------------------------------
diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c
index c94be24..1c9d54e 100644
--- a/src/pcre2_jit_compile.c
+++ b/src/pcre2_jit_compile.c
@@ -7277,7 +7277,11 @@ int lgb, rgb, ricount;
 PCRE2_SPTR bptr;
 uint32_t c;
 
-GETCHARINC(c, cc);
+/* Patch by PH */
+/* GETCHARINC(c, cc); */
+
+c = *cc++;
+
 lgb = UCD_GRAPHBREAK(c);
 
 while (cc < end_subject)
diff --git a/testdata/testinput4 b/testdata/testinput4
index 0ef7b8e..029e292 100644
--- a/testdata/testinput4
+++ b/testdata/testinput4
@@ -2301,4 +2301,7 @@
 \= Expect no match     
     \x{123}\x{124}\x{123}
 
+/\X*/
+    \xF3aaa\xE4\xEA\xEB\xFEa
+
 # End of testinput4
diff --git a/testdata/testoutput4 b/testdata/testoutput4
index 6056e6d..577f71f 100644
--- a/testdata/testoutput4
+++ b/testdata/testoutput4
@@ -3729,4 +3729,8 @@ No match
     \x{123}\x{124}\x{123}
 No match
 
+/\X*/
+    \xF3aaa\xE4\xEA\xEB\xFEa
+ 0: \xf3aaa\xe4\xea\xeb\xfea
+
 # End of testinput4
