Allow negation operator for string comparisons in DMAP queries

This commit is contained in:
Julien BLACHE 2009-12-29 19:10:51 +01:00
parent f56884015f
commit 8025db2dc2

View File

@ -199,13 +199,6 @@ expr returns [ pANTLR3_STRING result, int valid ]
/* String field: escape string, check for '*' */ /* String field: escape string, check for '*' */
else else
{ {
if (neg_op)
{
DPRINTF(E_LOG, L_DAAP, "Negation not valid for string operations\n");
$valid = 0;
goto STR_result_valid_0; /* ABORT */
}
if (op != ':') if (op != ':')
{ {
DPRINTF(E_LOG, L_DAAP, "Operation '\%c' not valid for string values\n", op); DPRINTF(E_LOG, L_DAAP, "Operation '\%c' not valid for string values\n", op);
@ -239,7 +232,7 @@ expr returns [ pANTLR3_STRING result, int valid ]
switch(op) switch(op)
{ {
case ':': case ':':
if (neg_op) /* Not valid for strings, checked above */ if (neg_op)
$result->append8($result, " <> "); $result->append8($result, " <> ");
else else
$result->append8($result, " = "); $result->append8($result, " = ");