diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-01-24 01:01:27 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-01-24 01:01:27 +0000 |
commit | 09968fb3154cbbecbf62a2cc677296a484a70b8a (patch) | |
tree | f9a97829a1492f019f7b2d611dd7b144345cd3aa | |
parent | 83e47dfd5b5774762ca53f2aaf29a3fd8cb27ae4 (diff) | |
download | libcss-09968fb3154cbbecbf62a2cc677296a484a70b8a.tar.gz libcss-09968fb3154cbbecbf62a2cc677296a484a70b8a.tar.bz2 |
Fixup ABS(), as per number.c
svn path=/trunk/libcss/; revision=6215
-rw-r--r-- | test/dump.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/dump.h b/test/dump.h index 1adfbe6..b173174 100644 --- a/test/dump.h +++ b/test/dump.h @@ -321,7 +321,7 @@ static const char *sides[] = { "top", "right", "bottom", "left" }; static void dump_fixed(fixed f, char **ptr) { -#define ABS(x) ((x) < 0 ? -(x) : (x)) +#define ABS(x) (uint32_t)((x) < 0 ? -(x) : (x)) uint32_t uintpart = FIXTOINT(ABS(f)); /* + 500 to ensure round to nearest (division will truncate) */ uint32_t fracpart = ((ABS(f) & 0x3ff) * 1000 + 500) / (1 << 10); |