summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;