]> andersk Git - moira.git/blobdiff - server/qrtn.pc
fix for queries with LIKE clause at the end of the qualifier
[moira.git] / server / qrtn.pc
index 35249c87f11f25faee4195da701c67a979c11230..303bdc8f1c8d393830d8ad27e8f3de9e17cb4590 100644 (file)
@@ -501,11 +501,11 @@ char *build_qual(char *fmt_buf, int argc, char *argv[])
            }
 
          /* if no pattern characters, write over "LIKE" with " =  " */
-         if (!pattern)
+         if (!pattern && !escape)
            memcpy(likepos, " =  ", 4);
 
          fmt = arg + 2;
-         while (*fmt != ' ')
+         while (*fmt && *fmt != ' ')
            *res++ = *fmt++;
 
          if (escape)
This page took 0.272246 seconds and 4 git commands to generate.