diff options
author | Corentin Chary <corentincj@iksaif.net> | 2011-02-04 09:06:02 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-02-23 16:28:28 -0600 |
commit | 368d25881c94f9e09ef19a3d93e8fec797dbcd05 (patch) | |
tree | b60ef7133fb6ecc962f906a11d6d7a1ae024fc69 /ui/vnc-enc-zrle.c | |
parent | 148954faca586c42e5a4b06bc3ac67bd44e7fd83 (diff) |
vnc: fix uint8_t comparisons with negative values
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'ui/vnc-enc-zrle.c')
-rw-r--r-- | ui/vnc-enc-zrle.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/vnc-enc-zrle.c b/ui/vnc-enc-zrle.c index 016a406eec..917d384f57 100644 --- a/ui/vnc-enc-zrle.c +++ b/ui/vnc-enc-zrle.c @@ -260,7 +260,8 @@ static int zrle_send_framebuffer_update(VncState *vs, int x, int y, int zywrle_level; if (vs->zrle.type == VNC_ENCODING_ZYWRLE) { - if (!vs->vd->lossy || vs->tight.quality < 0 || vs->tight.quality == 9) { + if (!vs->vd->lossy || vs->tight.quality == (uint8_t)-1 + || vs->tight.quality == 9) { zywrle_level = 0; vs->zrle.type = VNC_ENCODING_ZRLE; } else if (vs->tight.quality < 3) { |