summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBurnZeZ <brz-9dev@feline.systems>2016-04-06 20:22:42 -0400
committerBurnZeZ <brz-9dev@feline.systems>2016-04-06 20:22:42 -0400
commit455a0a09acbe2c0e480a4df853ad1c461542e76d (patch)
treec013a7fd164bee46a7aa2b14608b8c7febd12982
parent796e7b84bd7a49b97d3e592b4b7537c4ed096457 (diff)
downloadplan9front-455a0a09acbe2c0e480a4df853ad1c461542e76d.tar.xz
jpg: fd == 0 is valid, so don't ignore it
-rw-r--r--sys/src/cmd/jpg/jpg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/cmd/jpg/jpg.c b/sys/src/cmd/jpg/jpg.c
index 4bc9cf4bc..6565cd98c 100644
--- a/sys/src/cmd/jpg/jpg.c
+++ b/sys/src/cmd/jpg/jpg.c
@@ -125,7 +125,7 @@ main(int argc, char *argv[])
if(yflag==0 && dflag==0 && colorspace==CYCbCr){ /* see if we should convert right to RGB */
fd = open("/dev/screen", OREAD);
- if(fd > 0){
+ if(fd >= 0){
buf[12] = '\0';
if(read(fd, buf, 12)==12 && chantodepth(strtochan(buf))>8)
colorspace = CRGB;