jpg: fd == 0 is valid, so don't ignore it
This commit is contained in:
parent
796e7b84bd
commit
455a0a09ac
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue