--- a/plugins/ripperX_plugin-lame.c
+++ b/plugins/ripperX_plugin-lame.c
@@ -15,17 +15,16 @@
 lame_read_stat (double *current)
 {
 	char temp[OUTPUT_BUF_LENGTH];
-	char string[100];
-	char *string1;
 	int bytes_read;
+	char percent = '\0';
 	/* Grab new ouput from 'lame'  */
-	bytes_read = read (0, (void *) temp, sizeof (temp));
-        if (bytes_read > OFFSET_LENGTH) {
-                sscanf (&temp[OFFSET_LENGTH], "%s%%)|", string);
-                *current = atof(string) / 100.0;
-                return (0);
-        }
-	return (-1);
+	bytes_read = read (0, (void *) temp, sizeof (temp)-1);
+	if (bytes_read > 0) {
+		temp[bytes_read] = '\0';
+		sscanf (temp, " %*d/%*d ( %lg%c", current, &percent);
+		*current /= 100;
+	}
+	return (percent == '%') ? 0 : -1;
 }
 
 int