From: handa Date: Thu, 22 Oct 2009 04:10:04 +0000 (+0000) Subject: (check_version): Fix the check. X-Git-Tag: merge-to-XML~54 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6eb546795720d793e290a9c651f4e6440abf06be;p=m17n%2Fm17n-lib.git (check_version): Fix the check. --- diff --git a/src/database.c b/src/database.c index 8844f09..853d583 100644 --- a/src/database.c +++ b/src/database.c @@ -551,11 +551,11 @@ check_version (MText *version) break; ver[i] = ver[i] * 10 + (*verstr - '0'); } - return (ver[0] < M17NLIB_MAJOR_VERSION + return (ver[0] > M17NLIB_MAJOR_VERSION || (ver[0] == M17NLIB_MAJOR_VERSION - && (ver[1] < M17NLIB_MINOR_VERSION + && (ver[1] > M17NLIB_MINOR_VERSION || (ver[1] == M17NLIB_MINOR_VERSION - && ver[2] <= M17NLIB_PATCH_LEVEL)))); + && ver[2] >= M17NLIB_PATCH_LEVEL)))); } static MDatabase *