blob: b5ed4bee412b78522d04dc528e6fce57fbe8cbdb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
commit e4dc3902f6c451448bbeb5c1908df617bd44e244
Author: Raphael Manfredi <Raphael.Manfredi@pobox.com>
Date: Tue Dec 3 23:41:31 2013 +0100
guid_extract_gtkg_info(): fixed grave bug, making all GTKGs appear hostile.
diff --git a/src/core/guid.c b/src/core/guid.c
index c6f1651..fb4c838 100644
--- a/src/core/guid.c
+++ b/src/core/guid.c
@@ -345,7 +345,8 @@ guid_extract_gtkg_info(const struct guid *guid, size_t start,
product_major = product_get_major();
if (major != product_major) {
- if (major + 1 != product_major || major - 1 != product_major)
+ int8 delta = product_major - major;
+ if (delta < -1 || delta > 1)
return FALSE;
}
|