]> git.lizzy.rs Git - plan9front.git/commitdiff
rio: return correct color chan after screen depth change
authorcinap_lenrek <cinap_lenrek@centraldogma>
Fri, 25 Nov 2011 00:10:46 +0000 (01:10 +0100)
committercinap_lenrek <cinap_lenrek@centraldogma>
Fri, 25 Nov 2011 00:10:46 +0000 (01:10 +0100)
sys/src/cmd/rio/xfid.c

index 814e9da5a11a2b79fe37c6bec212bed3e36f0999..2bed90fbd7704530f039c09d800aaff1718cc7db 100644 (file)
@@ -570,7 +570,7 @@ readwindow(Image *i, char *t, Rectangle r, int offset, int n)
        int ww, y;
 
        offset -= 5*12;
-       ww = bytesperline(r, screen->depth);
+       ww = bytesperline(r, i->depth);
        r.min.y += offset/ww;
        if(r.min.y >= r.max.y)
                return 0;