--- ray/src/px/ra_skel.c 1993/07/12 12:41:16 2.6 +++ ray/src/px/ra_skel.c 1993/10/27 09:37:35 2.7 @@ -134,10 +134,12 @@ skel2ra() /* convert 24-bit scanlines to Radiance pic quiterr("out of memory in skel2ra"); /* convert image */ for (y = ymax-1; y >= 0; y--) { - scanout[x][RED] = getc(stdin); - scanout[x][GRN] = getc(stdin); - scanout[x][BLU] = getc(stdin); - if (feof(stdin) || ferror(stdin)) + for (x = 0; x < xmax; x++) { + scanout[x][RED] = getc(stdin); + scanout[x][GRN] = getc(stdin); + scanout[x][BLU] = getc(stdin); + } + if (feof(stdin) | ferror(stdin)) quiterr("error reading skel image"); /* undo gamma */ gambs_colrs(scanout, xmax);