Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Don't insist on a space after an integer. Forcing a space before the closing bracket in a call like pkg query -e '(%s>1000 && %s<2000)' '%o %sb' looks/feels awkward.
Rolf Grossmann committed 13 years ago
commit f0822ea5a0d3735f1e9169cd498ae704e3ea9809
parent b45eab5
1 file changed +2 -4
modified pkg/query.c
@@ -579,11 +579,9 @@ format_sql_condition(const char *str, struct sbuf *sqlcond)
				}
			}
		} else if (state == INT) {
-
			if (isspace(str[0])) {
+
			if (!isnumber(str[0])) {
				state = POST_EXPR;
-
			} else if (!isnumber(str[0])) {
-
				fprintf(stderr, "a number is expected, got: %c\n", str[0]);
-
				return (EPKG_FATAL);
+
				str--;
			} else {
				sbuf_putc(sqlcond, str[0]);
			}