Fix parser bug dealing with range options and postfix

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
diff --git a/parse.c b/parse.c
index e9eb738..585fb7e 100644
--- a/parse.c
+++ b/parse.c
@@ -168,19 +168,20 @@
 
 static unsigned long long get_mult_bytes(const char *str, int len, void *data)
 {
-	const char *p;
+	const char *p = str;
 
 	if (len < 2)
 		return __get_mult_bytes(str, data);
 
-	/*
-	 * if the last char is 'b' or 'B', the user likely used
-	 * "1gb" instead of just "1g". If the second to last is also
-	 * a letter, adjust.
-	 */
-	p = str + len - 1;
-	while (isalpha(*(p - 1)))
-		p--;
+        /*
+         * Go forward until we hit a non-digit
+         */
+	while ((p - str) <= len) {
+		if (!isdigit(*p))
+			break;
+		p++;
+	}
+
 	if (!isalpha(*p))
 		p = NULL;