summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-12-14 14:01:55 -0800
committerKaz Kylheku <kaz@kylheku.com>2011-12-14 14:01:55 -0800
commit1f2f893c7de22ef3f64d68e0b62d43fbdb07af7c (patch)
treead834b994a1e7eae2e49d58317b6886894df629d
parentdd6c8f68e1befce6ab4bfa66422f33609c25b6bd (diff)
downloadtxr-1f2f893c7de22ef3f64d68e0b62d43fbdb07af7c.tar.gz
txr-1f2f893c7de22ef3f64d68e0b62d43fbdb07af7c.tar.bz2
txr-1f2f893c7de22ef3f64d68e0b62d43fbdb07af7c.zip
* arith.c (abso): broken for fixnums.
-rw-r--r--ChangeLog4
-rw-r--r--arith.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 603eb60d..8caaf6a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2011-12-14 Kaz Kylheku <kaz@kylheku.com>
+ * arith.c (abso): broken for fixnums.
+
+2011-12-14 Kaz Kylheku <kaz@kylheku.com>
+
* txr.vim: Highlight hash prefix and quote.
2011-12-14 Kaz Kylheku <kaz@kylheku.com>
diff --git a/arith.c b/arith.c
index ccc29657..14696c24 100644
--- a/arith.c
+++ b/arith.c
@@ -459,7 +459,7 @@ val abso(val anum)
return n;
} else {
cnum n = c_num(anum);
- return num(n < 0 ? n : n);
+ return num(n < 0 ? -n : n);
}
}