...
diff --git a/coders/json.c b/coders/json.c
index 6ee4b29..d68ec22 100644
--- a/coders/json.c
+++ b/coders/json.c
@@ -1502,7 +1502,7 @@
       while (*p != '\0')
       {
         q=p;
-        while ((*q != '\377') && (*q != '\0'))
+        while ((*q != '\xff') && (*q != '\0'))
           q++;
         (void) CopyMagickString(image_info->filename,p,(size_t) (q-p+1));
         p=q+1;