jpg: fd == 0 is valid, so don't ignore it

This commit is contained in:
BurnZeZ 2016-04-06 20:22:42 -04:00
parent 796e7b84bd
commit 455a0a09ac

View file

@ -125,7 +125,7 @@ main(int argc, char *argv[])
if(yflag==0 && dflag==0 && colorspace==CYCbCr){ /* see if we should convert right to RGB */ if(yflag==0 && dflag==0 && colorspace==CYCbCr){ /* see if we should convert right to RGB */
fd = open("/dev/screen", OREAD); fd = open("/dev/screen", OREAD);
if(fd > 0){ if(fd >= 0){
buf[12] = '\0'; buf[12] = '\0';
if(read(fd, buf, 12)==12 && chantodepth(strtochan(buf))>8) if(read(fd, buf, 12)==12 && chantodepth(strtochan(buf))>8)
colorspace = CRGB; colorspace = CRGB;