fix previous commit
authorNikolas Garofil <garo@dunaldi.garofil.be>
Wed, 11 Nov 2009 12:44:50 +0000 (13:44 +0100)
committerNikolas Garofil <garo@dunaldi.garofil.be>
Wed, 11 Nov 2009 12:44:50 +0000 (13:44 +0100)
src/proc.c

index 3a32511..88a5e35 100644 (file)
@@ -55,7 +55,7 @@ void print_pid(struct text_object *obj, char *p, int p_max_size)
        infofile = fopen(obj->data.s, "r");
        if(infofile) {
                bytes_read = fread(buf, 1, p_max_size, infofile);
-               for(i = 0; i < read-1; i++) {
+               for(i = 0; i < bytes_read-1; i++) {
                        if(buf[i] == 0) {
                                buf[i] = ' ';
                        }