]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
ir_value_life_merge_into: fix a possible underflow
authorWolfgang (Blub) Bumiller <blub@speed.at>
Fri, 24 Aug 2012 13:06:30 +0000 (15:06 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Fri, 24 Aug 2012 13:06:30 +0000 (15:06 +0200)
ir.c

diff --git a/ir.c b/ir.c
index d2e1e0f9d612889958fc84385929caec3a63bda6..0be4d05179916b09255a6570857a32591e84c344 100644 (file)
--- a/ir.c
+++ b/ir.c
@@ -925,8 +925,8 @@ bool ir_value_life_merge_into(ir_value *self, const ir_value *other)
                 entry->start = life->start;
             }
 
-            if (life->end     >  entry->end &&
-                life->start-1 <= entry->end)
+            if (life->end   >  entry->end &&
+                life->start <= entry->end+1)
             {
                 /* ends later and overlaps */
                 entry->end = life->end;