summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/draw/draw_pt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt.c b/src/gallium/auxiliary/draw/draw_pt.c
index 9140faeea9..85a75525c8 100644
--- a/src/gallium/auxiliary/draw/draw_pt.c
+++ b/src/gallium/auxiliary/draw/draw_pt.c
@@ -37,6 +37,8 @@
static unsigned trim( unsigned count, unsigned first, unsigned incr )
{
+ if (count < first)
+ return 0;
return count - (count - first) % incr;
}