From b6c75559768e8309484588284d2bb001b19922ee Mon Sep 17 00:00:00 2001 From: angel Date: Mon, 6 Jun 2005 14:41:50 +0000 Subject: [PATCH] song_test_measure_boundary() semantics has been inverted; it returns the remainder, so that a 0 value is the correct one. git-svn-id: file:///home/angel/tmp/svn-triptico/ahxm/trunk@660 c87de0a0-a11c-0410-a1e5-866214bc28b2 --- song.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/song.c b/song.c index 8d7c16b..00ce3fa 100644 --- a/song.c +++ b/song.c @@ -113,18 +113,15 @@ void song_sort(void) * @num: meter numerator * @den: meter denominator * - * Does a measure boundary check. Returns 1 if the event time falls - * exactly between two measures, or zero otherwise. + * Does a measure boundary check. Returns 0 if the event time falls + * exactly between two measures, or nonzero otherwise. */ int song_test_measure_boundary(struct song_ev_measure * e, int num, int den) { - int ret=1; + int ret; - if(((int)(e->time * den)) % num != 0) - { + if((ret=((int)(e->time * den)) % num)) printf("Measure boundary check failed in line %d\n", e->line); - ret=0; - } return(ret); } -- 2.11.4.GIT